フィルターのクリア

How to extract the second row of a 2x1 matrix?

21 ビュー (過去 30 日間)
Malu
Malu 2018 年 3 月 9 日
回答済み: James Tursa 2018 年 3 月 9 日
How to extract the first and second rows of a matrix and equate it seperatly to two values?

回答 (1 件)

James Tursa
James Tursa 2018 年 3 月 9 日
M = your two-row matrix
M1 = M(1,:); % 1st row of M
M2 = M(2,:); % 2nd row of M
However, in many cases it is better to simply use M(1,:) and M(2,:) directly in your downstream code instead of creating separate variables M1 and M2. This is particularly true if you have many rows to work with ... you should never create a bunch of variables called M1, M2, M3, M4, etc for that situation.

カテゴリ

Help Center および File ExchangeSignal Operations についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by