行列の一行目を消す方法

14 views (last 30 days)
可野 谷上
可野 谷上 on 18 Dec 2020
Commented: 可野 谷上 on 18 Dec 2020
行列の1行目を消す方法を知りたいです。
例えば A = [1 2 3; 4 5 6 ; 7 8 9] のような 3×3の行列があるとすると
B = [4 5 6; 7 8 9] の 2×3行列にしたいです。
よろしくお願いします。

Accepted Answer

Hiroshi Miyagawa
Hiroshi Miyagawa on 18 Dec 2020
A = [1 2 3;4 5 6;7 8 9];
B = A(2:end,:); % 行列Aの2行目以降を取り出します
% 2行目以降を 2:end と表現しています
  1 Comment
可野 谷上
可野 谷上 on 18 Dec 2020
解決しました。
ありがとうございます。

Sign in to comment.

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!