Converting a 3D matrix into 2D matrix correctly
Show older comments
Given a 2D image I had to create a vector of features for each pixel (i,j). To do that, I created a 3D matrix such that the 3rd dimension is a vector of features for the pixel. For example, (2, 3, :) represents the vector of features for pixel (2,3) in the image .
Now I need to convert this 3D matrix into 2D matrix where each row is a vector of features. I tried to understand the function reshape() but could not get it to work the way I need.
I would appreciate some expert advice
Thank you
Accepted Answer
More Answers (1)
R S
on 20 Aug 2015
0 votes
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!