plot median of a vector from several seperate fodlers

1 回表示 (過去 30 日間)
Hilal Kol
Hilal Kol 2020 年 3 月 4 日
コメント済み: KALYAN ACHARJYA 2020 年 3 月 4 日
Hi,
I have 73 mat Data from a simulation and want to plot from this each folders the median pareto_fitness as one plot.
I could load each of the midians as M but can not plot them.
Can someone help me?
What works for now:
"
figure;
hold on;
for fileidx = 0:40
filedata = load(fullfile('F:\Simulationsergebnisse\Generationen_FMUOneHeatPump_ACWinter\ERROR_FMU_Gen85_Iter\Generations', sprintf('Gen_%d.mat', fileidx)));
M = median(filedata.pareto_fitness(:,1))
plot(M (1,:));
end
M =
1.3731e+03
M =
1.3818e+03
M =
1.3807e+03
M =
1.3807e+03
M =
1.3807e+03
M =
1.3807e+03
M =
1.3776e+03
M =
1.3776e+03
M =
1.3776e+03
M =
1.3776e+03
M =
1.3776e+03
M =
1.3776e+03
:
:
:"

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 3 月 4 日
編集済み: KALYAN ACHARJYA 2020 年 3 月 4 日
figure;
hold on;
M=zeros(1,40);
for fileidx = 1:40
filedata = load(fullfile('F:\Simulationsergebnisse\Generationen_FMUOneHeatPump_ACWinter\ERROR_FMU_Gen85_Iter\Generations', sprintf('Gen_%d.mat', fileidx)));
M(fileidx) = median(filedata.pareto_fitness(:,1))
end
plot(M); %If it is not properly visualize try loglog(M)
  3 件のコメント
Hilal Kol
Hilal Kol 2020 年 3 月 4 日
It workes now. Thank you very much!
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 3 月 4 日
Welcome

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by