reshape2matrix.m v1.0 (Oct 2009)

Reshapes a multidimensional array into a 2-D matrix with an specific dimension in the columns!
다운로드 수: 915
업데이트 날짜: 2009/10/2

라이선스 보기

SYNTAX:
a) N-dim array X to matrix Y:
>> Y = reshape2matrix(X,DIM);
b) Matrix Y to N-dim array X:
>> X = reshape2matrix(Y,DIM,SIZE);

DESCRIPTION:
Some MATLAB or users defined functions do not work through an specific dimension in a multidimensional array, whether because its not supported like in FILTFILT or the output is a matrix like in CORRCOEF.

A workaround on this problem is to specify the elements of X in the specific dimension we like to work (DIM) with some index. Another one is to transform this multidimensional array into a simple 2-dimensional matrix with the vectors of the DIM dimension as its columns.

This latter is exactly what this little program does. Besides, after working with the generated matrix, you can get the original multidimensional shape by calling once again this function with the third input SIZE of the original array.

Enjoy it!
Any comments and bug reports will be very appreciated!

인용 양식

Carlos Adrian Vargas Aguilera (2024). reshape2matrix.m v1.0 (Oct 2009) (https://www.mathworks.com/matlabcentral/fileexchange/25472-reshape2matrix-m-v1-0-oct-2009), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2008b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Matrices and Arrays에 대해 자세히 알아보기
도움

줌: DimFunc

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0