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)

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by