行列の任意の列をグラフ化したいです。

61 views (last 30 days)
syun watanabe
syun watanabe on 26 Apr 2018
Answered: Hiroumi Mita on 27 Apr 2018
例として500x500の行列があったとしてそこから任意の列iのグラフを作成したいのですがどうしたらいいのでしょうか また、x軸に0.001、0.002、0.003と0.5まで与えたいのですがどのような組み方をしたらいいでしょうか
かなり初歩的な質問なのかもしれませんが、よろしくお願いします。

Answers (1)

Hiroumi Mita
Hiroumi Mita on 27 Apr 2018
次のスクリプトを試して、調べてください。
%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!