行列の任意の列をグラフ化したいです。
Show older comments
例として500x500の行列があったとしてそこから任意の列iのグラフを作成したいのですがどうしたらいいのでしょうか また、x軸に0.001、0.002、0.003と0.5まで与えたいのですがどのような組み方をしたらいいでしょうか
かなり初歩的な質問なのかもしれませんが、よろしくお願いします。
Answers (1)
Hiroumi Mita
on 27 Apr 2018
1 vote
次のスクリプトを試して、調べてください。
%Aは500行、500列の乱数
A=rand(500,500);
%BはAの全行、一列目を抽出
B=A(:,1);
%xは初期値0.001,刻み幅0.001,最終値0.5のベクトル
x=0.001:0.001:0.5;
%横軸x、縦軸Bをplot
figure;plot(x,B)
Categories
Find more on 数学 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!