필터 지우기
필터 지우기

How to Convert 3d matrix to row matrix???

조회 수: 3 (최근 30일)
Mehul Jain
Mehul Jain 2020년 4월 8일
댓글: Mehul Jain 2020년 4월 9일
I have a 3d matrix in the workspace variable named WT.dec{1,1}, I need it to be converted to single dimention row matrix. How can do this???

채택된 답변

Aoi Midori
Aoi Midori 2020년 4월 8일
A = rand(10,10,10);
B = reshape(A,[1,1000]);
  댓글 수: 4
darova
darova 2020년 4월 8일
Can't you write it as column? Or matrix?
Mehul Jain
Mehul Jain 2020년 4월 9일
No.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Vladimir Sovkov
Vladimir Sovkov 2020년 4월 8일
a=rand(2,2,2) % a sample 3D matrix a
b=a(:)' % is turned to the 1D row matrix b
  댓글 수: 1
Mehul Jain
Mehul Jain 2020년 4월 8일
I tried this 1d matrix writing to .csv file, but i am getting error.
a=rand(17,19,17)
b=a(:)'
xlswrite('RV.csv',B);
Error using xlswrite (line 219)
The specified data range is invalid or too large to write to the specified file format. Try writing to an XLSX file and use Excel A1 notation for the range argument, for example, ‘A1:D4’.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by