how to get variable value in plot automatically

2 visualizaciones (últimos 30 días)
Pallanti Srinivasa Rao
Pallanti Srinivasa Rao el 26 de Ag. de 2019
Respondida: KSSV el 26 de Ag. de 2019
how to get a plot displaying value ofgain_resp.png gain and corresponding responce in single figure as shown in attached image

Respuestas (1)

KSSV
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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by