MATLAB Answers

how legend update with variable

1 view (last 30 days)
RAVI
RAVI on 23 Aug 2019
Commented: RAVI on 26 Aug 2019
t=linspace(0.1,1,10)
legend ('0.1','0.2','0.3',......upto '1')
how legend update with variable 't' with there values on graph

  4 Comments

Show 1 older comment
Bruno Luong
Bruno Luong on 23 Aug 2019
There is something called ARRAYFUN
legend_txt = arrayfun(@(x)sprintf('%.1f',x),t,'UniformOutput',0)

Sign in to comment.

Answers (0)


Translated by