Several statements in if condition plotting and drawing arrow
Ältere Kommentare anzeigen
Hello,
My code is like this:
...
for nt=1:10001
t=(nt-1)*dt
...
if nt==1 | nt==101 | nt==1001
baseLine = 0; %# Baseline value for filling under the curves
index = 1:101; %# Indices of points to fill under
figure(3)
plot(xx,body_up,'k','Linewidth',1.5); %# Plot the first line
hold on; %# Add to the plot
h1 = fill(xx(index([1 1:end end])),... %# Plot the first filled polygon
[baseLine body_up(index) baseLine],...
'y','EdgeColor','none');
plot(xx,body_down,'k','Linewidth',1.5); %# Plot the second line
h2 = fill(xx(index([1 1:end end])),... %# Plot the second filled polygon
[baseLine body_down(index) baseLine], 'w','EdgeColor','none');
plot(xx(index),baseLine.*ones(size(index)),'r'); %#Plot the red line
title(['...=',num2str((nt-1)/(10000))]);
drawnow
end
end
The question >>
I want to show an arrow for each u and p in each time in the figure using latex. But when I use this code it shows just last nt value in if condition (1001) in the title.
Any help, please!
3 Kommentare
Sivakumaran Chandrasekaran
am 28 Dez. 2015
figure plot(1:10) x = [0.3 0.5]; y = [0.6 0.5]; annotation('textarrow',x,y,'String','y = x ')
Meva
am 28 Dez. 2015
Image Analyst
am 28 Dez. 2015
Meva you didn't really ask a question - you just said what you want and that was " I want to show an arrow", which is sort of an implied question. The function annotation() will allow you to draw arrows but then you said you knew how to draw arrows, so what is the question? Is it how do you do it in Latex? Can you ask an actual question starting out like "How do I .....?" because as of now, we don't know what your question is.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!