How do I to plot bar graph normalized to compare two controller

7 次查看(过去 30 天)
Hello everybody,
I am trying to achieve the same graph on the image below. I want to compare the results of two controllers for a wind turbine. As in the picture, the output data should be normalized against the "base" controller (blue bar). The values displayed are the root-mean square (RMS) of the error. The .mat file contains the data: "Result_base" and "Result_fuzzy".
Thanks for any help
load('data.mat')
error=[12.1,5.0e+3];
for idx=1:2
% norm_jonkman(:,idx)=(Result_jonkman(:,idx)-min(Result_jonkman(:,idx)))/(max(Result_jonkman(:,idx))-min(Result_jonkman(:,idx)));
% norm_fuzzy(:,idx)=(Result_fuzzy(:,idx)-min(Result_fuzzy(:,idx)))/(max(Result_fuzzy(:,idx)-min(Result_fuzzy(:,idx))));
RMS_base(idx)=rms( Result_base(:,idx)-error(idx));
RMS_Fuzzy(idx)=rms(Result_fuzzy(:,idx)-error(idx));
y(idx,:)= [1-( (RMS_base(idx)- RMS_base(idx))/RMS_base(idx)) 1-((RMS_Fuzzy(idx)- RMS_base(idx))/RMS_base(idx));];
end
figure;
bar(y)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Wind Power 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by