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

1 回表示 (過去 30 日間)
AM
AM 2014 年 7 月 7 日
コメント済み: Star Strider 2014 年 7 月 8 日
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.

採用された回答

Star Strider
Star Strider 2014 年 7 月 7 日
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 件のコメント
Star Strider
Star Strider 2014 年 7 月 8 日
My pleasure!
I’m actually interested in the results of your study. It is important both from public health and clinical care perspectives.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by