フィルターのクリア

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

5 ビュー (過去 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 Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by