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

1 次查看(过去 30 天)
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