how to get variable value in plot automatically
조회 수: 8 (최근 30일)
이전 댓글 표시
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개)
KSSV
2019년 8월 26일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!