how to get variable value in plot automatically
Mostrar comentarios más antiguos
how to get a plot displaying value of
gain and corresponding responce in single figure as shown in attached image
gain and corresponding responce in single figure as shown in attached image 1 comentario
Alex Mcaulley
el 26 de Ag. de 2019
See this: legend
Respuestas (1)
KSSV
el 26 de Ag. de 2019
x = 0:10 ;
figure
hold on
for i = 1:3
y = i*x ;
plot(x,y)
end
legend
OR
x = 0:10 ;
figure
hold on
for i = 1:3
y = i*x ;
plot(x,y)
str = ['k=',num2str(i)] ;
text(mean(x),mean(y),str)
end
Categorías
Más información sobre Legend en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!