Convert matrix size from 1xmxn to mxn
Show older comments
I want to compare two matrices. One's size is mxn and the other matrix size 1xmxn. How can I convert 1xmxn to mxn??
Accepted Answer
More Answers (1)
Piyush kant
on 9 Apr 2019
Just adding some context to previous answer by Andrei Bobrov. Basic idea is to convert 1 x m x n matrix into m x n x 1 as matlab omits last dimension if it is 1. Therefore the method i prefer is:
NewMat=sqeeze(Z)';
Whereas other two functions does the same thing.
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!