12 lines
512 B
Matlab
12 lines
512 B
Matlab
function [output_arg]=MaxDeviation(this,PG0,QG0,PD0,QD0)
|
|
PD0Array=repmat(PD0,1,this.sampleNum);
|
|
QD0Array=repmat(QD0,1,this.sampleNum);
|
|
PDMaxDev=max(abs( (this.PDArray-PD0Array)./PD0Array ),[],2);
|
|
QDMaxDev=max(abs( (this.QDArray-QD0Array)./QD0Array ),[],2);
|
|
PG0Array=repmat(PG0,this.sampleNum,1);
|
|
QG0Array=repmat(QG0,this.sampleNum,1);
|
|
PGMaxDev=max(abs( (PG0Array-this.PGArray)./PG0Array ));
|
|
QGMaxDev=max( abs( (QG0Array-this.QGArray)./QG0Array ) );
|
|
output_arg=max([PDMaxDev;QDMaxDev;PGMaxDev;QGMaxDev;]);
|
|
end
|