How to draw line connecting minima of graphs in the same plot space?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AM
am 7 Jul. 2014
Kommentiert: Star Strider
am 8 Jul. 2014
I would like to draw a line connecting the minima of 50 graphs in the same plot space. I am not sure what to put under
%%Plotting of minima call
in the following code snippet:
figure(2)
hold on
for w=1:0.01:1.5
Burden=AA+BB+w.*(CC+DD);
plot(mser,Burden./1000,'LineSmoothing','on')
drawnow;
pause(0.1);
axis([1 179 7 12]);
xlabel('Timing of ART initiation after initiation of TB treatment (days)')
ylabel('Total burden due to co-infected population (thousands)')
title('TOTAL BURDEN VS. TIMING OF ART INITIATION')
%%Minimum finding for Burden
MinInd = find(Burden == min(Burden));
disp(['The critical time to initiate ART is ' num2str(MinInd) ' days after initiation of TB treatment.'])
%%Plotting of minima call
end
I hope someone can help me. Thanks.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Jul. 2014
It’s difficult to follow what you’re doing, and I’m not quite sure what you want to plot Burden against, so this is only an educated guess as to what you want.
Consider saving the values (and perhaps the indices) of mser and Burden, perhaps in an array called CritART (for lack of a more appropriate idea):
CritArt(w,:) = [MinInd mser(MinInd) Burden(MinInd)];
then plot (in the same plot or preferably in a new plot):
plot(CritArt(:,2), CritART(:,3))
Just a guess on my part, but it might do what you want.
Seems to me an important study, so good luck with it!
1 Kommentar
Star Strider
am 8 Jul. 2014
My pleasure!
I’m actually interested in the results of your study. It is important both from public health and clinical care perspectives.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Specifying Target for Graphics Output finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!