pes2014-wronglowervoltagebound/@ForThesis/StatDeviation.m

21 lines
588 B
Matlab

function [ output_args ] = StatDeviation( this,PG0,QG0,PD0,QD0 )%ͳ¼ÆÎó²î
%STATDEVIATION Summary of this function goes here
% Detailed explanation goes here
PD0Array=repmat(PD0,1,this.sampleNum);
QD0Array=repmat(QD0,1,this.sampleNum);
PDDev=(this.PDArray-PD0Array)/0.05;
QDDev=(this.QDArray-QD0Array)/0.05;
PG0Array=repmat(PG0,this.sampleNum,1);
QG0Array=repmat(QG0,this.sampleNum,1);
PGDev=(PG0Array-this.PGArray)/0.01;
% QGDev=(QG0Array-this.QGArray)/0.01;
wholeMat=[PDDev;QDDev;PGDev'];
t1=wholeMat.^2;
t2=sum(t1,1);
t3=t2/size(t1,1);
t4=t3.^2;
output_args=sum(t4)/length(t4);
end