Extracting new matrix from existing matrix

1 回表示 (過去 30 日間)
M@lik Ali
M@lik Ali 2012 年 9 月 3 日
Hi all
I have matrix with 999*10
actually i have 10 feature of 999 images. now what i want is i want to extract features of some images in new matrix like i need the new matrix of 4,5,6 and 7 images among 999 images. my new matrix should be of size 4*10.
How can i do this please help me.
  1 件のコメント
Oleg Komarov
Oleg Komarov 2012 年 9 月 3 日
It's unclear to me.

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

採用された回答

Image Analyst
Image Analyst 2012 年 9 月 3 日
編集済み: Image Analyst 2012 年 9 月 3 日
Try this:
rowsToKeep = [4, 5, 6, 7, 42];
extractedMatrix = originalMatrix(rowsToKeep , :);
Note: the rows to keep do not need to be consecutive. If they were though, you could do it in one line like this:
extractedMatrix = originalMatrix(4:7, :);

その他の回答 (1 件)

M@lik Ali
M@lik Ali 2012 年 9 月 3 日
Thanks it working

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by