LoginSignup
3
3

More than 5 years have passed since last update.

MATLAB 基礎Tips

Posted at

0から1までを11個に分ける

linspace(0,1,11)

コロンで範囲指定

a(1:2,1:2)

1,2行1,2列を表示

コロンだけを使うと全範囲

a(:,1)

1列目を全てを表示

グラフの色を変える


plot(x,y,'r');

第3引数に色を指定。この場合は赤色(red)。

グリッド


grid

figure画面にグリッドを引く

ラベル


xlabel(' t[s]');

xlabel,ylabelでx軸,y軸にラベルを追加

凡例


legend('t[s]');

凡例を追加。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3