フィルターのクリア

How can I give legend to a plot as a series?

2 ビュー (過去 30 日間)
kanyvt
kanyvt 2015 年 4 月 8 日
コメント済み: Kelly Kearney 2015 年 4 月 9 日
Suppose I have multiple graphs on a plot for a parameter varying from -4 to 0.25 with difference of 0.25 between adjacent values (which is about 18 in number)? Can I say like legend y. where y is a variable varying from -4 to 0.25?

採用された回答

Kelly Kearney
Kelly Kearney 2015 年 4 月 8 日
Example data:
x = 1:10;
h = plot(x, x'*p)
Create legend:
legend(h, cellstr(num2str(p', '%.2f')));
  3 件のコメント
kanyvt
kanyvt 2015 年 4 月 9 日
Could you please tell me what is p here?
Kelly Kearney
Kelly Kearney 2015 年 4 月 9 日
Sorry, p was the parameter:
p = -4.0:0.25:0.25;

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by