Several statements in if condition plotting and drawing arrow
Mostrar comentarios más antiguos
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 comentarios
Sivakumaran Chandrasekaran
el 28 de Dic. de 2015
figure plot(1:10) x = [0.3 0.5]; y = [0.6 0.5]; annotation('textarrow',x,y,'String','y = x ')
Meva
el 28 de Dic. de 2015
Image Analyst
el 28 de Dic. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Line Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!