Can I insert an iterating value in legends of a plot ?

조회 수: 2 (최근 30일)
Anshuman S
Anshuman S 2017년 12월 23일
편집: the cyclist 2017년 12월 23일
The code is as follows ; I want to use the iterating b value in the legends . like b=5, b=8 , b=11 etc.
if true
% code
for b= 5:3:40
f = @(i,o) cotd(o) - cotd(i) - w/c;
fimplicit(f,[0 50 0 50])
legend('beta = ' b );
end
end

채택된 답변

the cyclist
the cyclist 2017년 12월 23일
편집: the cyclist 2017년 12월 23일
legend(['beta = ',sprintf('%d',b)])

추가 답변 (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