how to make 10 by 10 matrix into 1 by 100?

2 ビュー (過去 30 日間)
maida
maida 2016 年 12 月 9 日
回答済み: Star Strider 2016 年 12 月 9 日
for example i am extracting LBP of 10 images of size 100 by 100. LBP function returns feature vector size 100 by 100 . to store each fv of each image class consuming 100 rows and 100 columns,
i want to store each fv belonging to their respective class in one long row forming 100*100= 10,000 rows for each image class.
similarly i obtain fv 10 by 10,000 for 10 images.
how can i do that?

採用された回答

Star Strider
Star Strider 2016 年 12 月 9 日
It depends on how you want the vector to be formatted.
The easiest way is:
fvv = fv(:);
where ‘fv’ is your original (100 x 100) matrix, and ‘fvv’ is a (10^4 x 1) vector. It is created as:
fvv = [fv(:,1); fv(:,2); ...; fv(:,100)];

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by