How to plot specific values from a matrix of 10*10
1 回表示 (過去 30 日間)
古いコメントを表示
I have a matrix of 10*10 with 5 columns having value >0 and other 5 columns have value=0. I just want to plot the output having values>0. Please suggest me a code. Thanks
回答 (1 件)
the cyclist
2021 年 9 月 26 日
M = [0 1 0 2;
0 2 0 3;
0 3 0 4];
colsToPlot = not(all(M==0));
figure
plot(M(:,colsToPlot))
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!