How to draw line connecting minima of graphs in the same plot space?

2 views (last 30 days)
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.

Accepted Answer

Star Strider
Star Strider on 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 Comment
Star Strider
Star Strider on 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.

Sign in to comment.

More Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!