Plotting the case of iteration

5 ビュー (過去 30 日間)
Najiya Omar
Najiya Omar 2018 年 1 月 22 日
回答済み: Najiya Omar 2018 年 1 月 23 日
in the code below I want to see the plot has the names of all the cases of "0.1 to 1" each line indicates case; feature (0.1), feature (0.2) and so on till feature (1.0).
L =0.1:0.1:1.0;
tot=numel(L);
for i=1:tot
plot(x+i,y+i,'Color');
nam{i} = sprintf('feaures (%d)',i);

採用された回答

Birdman
Birdman 2018 年 1 月 22 日
L =0.1:0.1:1.0;
tot=numel(L);
hold on;
for i=1:tot
plot(x+i,y+i,'Color');
nam{i} = sprintf('feaures (%d)',i);
end
  4 件のコメント
Birdman
Birdman 2018 年 1 月 22 日
編集済み: Birdman 2018 年 1 月 22 日
L =0.1:0.1:1.0;
tot=numel(L);
hold on;
for i=1:tot
plot(x+L(i),y+L(i),'Color');
leg{i}=['feature' num2str(L(i))];
end
legend(leg)
Najiya Omar
Najiya Omar 2018 年 1 月 22 日
編集済み: Najiya Omar 2018 年 1 月 22 日
@ Birdman perfect 100% thanks!!!!
If I want to skip case like 0.3, 0.7 to be plotted

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

その他の回答 (1 件)

Najiya Omar
Najiya Omar 2018 年 1 月 23 日
If I want to skip some cases like 0.3, 0.7 in the loop iteration and to be plotted

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by