pes2014/@ForThesis/StatDeviation.m

21 lines
589 B
Mathematica
Raw Normal View History

2013-01-21 21:47:54 +08:00
function [ output_args ] = StatDeviation( this,PG0,QG0,PD0,QD0 )%ͳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
%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;
2013-01-21 22:37:54 +08:00
% QGDev=(QG0Array-this.QGArray)/0.01;
wholeMat=[PDDev;QDDev;];
2013-01-21 21:47:54 +08:00
t1=wholeMat.^2;
t2=sum(t1,1);
t3=t2/size(t1,1);
t4=t3.^.5;
2013-01-21 21:47:54 +08:00
output_args=sum(t4)/length(t4);
end