필터 지우기
필터 지우기

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

조회 수: 3 (최근 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 CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by