6
plotAndComparison.asv
Normal file
6
plotAndComparison.asv
Normal file
@@ -0,0 +1,6 @@
|
||||
function [ output_args ] = plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||
x=1:length(rVolt);
|
||||
plot(x,rVolt)
|
||||
|
||||
end
|
||||
|
||||
12
plotAndComparison.m
Normal file
12
plotAndComparison.m
Normal file
@@ -0,0 +1,12 @@
|
||||
function plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||
x=1:length(rVolt);
|
||||
subplot(2,1,1);
|
||||
plot(x,rVolt,'r-');
|
||||
hold on
|
||||
plot(x,SEVolt);
|
||||
subplot(2,1,2);
|
||||
plot(x,rVAngel,'r-');
|
||||
hold on
|
||||
plot(x,SEVAngel);
|
||||
end
|
||||
|
||||
3
run.m
3
run.m
@@ -10,7 +10,7 @@ addpath('.\Powerflow')
|
||||
% 电压 相角
|
||||
%%
|
||||
%% 开始生成量测量
|
||||
sigma=0.05;% 标准差
|
||||
sigma=0.01;% 标准差
|
||||
%% 电压
|
||||
%电压幅值
|
||||
rVolt=Volt; %幅值
|
||||
@@ -117,3 +117,4 @@ fprintf('Ŀ
|
||||
fprintf('相对误差\n');
|
||||
(abs(rVolt-double(SEVolt)))./(rVolt)
|
||||
MaxDeviation(rVolt,SEVolt,rVAngel,SEVAngel)
|
||||
plotAndComparison( rVolt,rVAngel,SEVolt,SEVAngel )
|
||||
|
||||
Reference in New Issue
Block a user