how to get variable value in plot automatically
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
how to get a plot displaying value of gain and corresponding responce in single figure as shown in attached image
Réponses (1)
KSSV
le 26 Août 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
0 commentaires
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!