필터 지우기
필터 지우기

Update Legend with varying values (variables)

조회 수: 3 (최근 30일)
GettinStarted
GettinStarted 2020년 7월 4일
댓글: GettinStarted 2020년 7월 4일
Hello Community,
let's say the variable n in a loop becomes n=1, n=2, n=3, n=4, n=5.
The results are 5 different graphs in one figure.
How can the legend be automatically adjusted to it --> curve1 -->n=1; curve2 --> n=2 etc.?
Thank you.

채택된 답변

madhan ravi
madhan ravi 2020년 7월 4일
legend(sprintf('curve%d', n))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by