Creating a new matrix from an existing matrix

46 ビュー (過去 30 日間)
Claire
Claire 2015 年 1 月 21 日
コメント済み: Claire 2015 年 1 月 21 日
My original matrix is a 4x6 matrix. However, I need to extract part of this matrix to make a new 3x4 matrix. For this new matrix, I only need the first, second, and fourth row and the first, second, fourth, and sixth columns from the original matrix. How would I go about creating this new matrix? Thank you!

採用された回答

Image Analyst
Image Analyst 2015 年 1 月 21 日
編集済み: Image Analyst 2015 年 1 月 21 日
m2 = m([1,2,4],:); % Extract rows 1, 2, and 4;
m2 = m2(:, [1, 2, 4, 6]); Now extract columns 1,2,4,& 6
  1 件のコメント
Claire
Claire 2015 年 1 月 21 日
Thank you so much! It worked perfectly!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by