行列の一行目を消す方法
14 views (last 30 days)
Show older comments
行列の1行目を消す方法を知りたいです。
例えば A = [1 2 3; 4 5 6 ; 7 8 9] のような 3×3の行列があるとすると
B = [4 5 6; 7 8 9] の 2×3行列にしたいです。
よろしくお願いします。
0 Comments
Accepted Answer
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 と表現しています
More Answers (0)
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!