フィルターのクリア

Export part of the matrix to excel

9 ビュー (過去 30 日間)
Natasha Elizabeth Francis
Natasha Elizabeth Francis 2022 年 6 月 18 日
回答済み: Animesh Gupta 2022 年 10 月 10 日
I understand that a matrix output could be exported to excel using the writematrix command. But it has a limit when it is a large matrix. I got the following error 'The data block starting at cell 'A1' exceeds the sheet boundaries by 0 row(s) and 249744 column(s)'. Is it possible that I can extract part of the matrix to excel in matlab?
  1 件のコメント
Image Analyst
Image Analyst 2022 年 6 月 18 日
What is the size of your matrix, and what section do you want to extract and export to Excel?
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:

サインインしてコメントする。

回答 (1 件)

Animesh Gupta
Animesh Gupta 2022 年 10 月 10 日
Hello,
It is my understansing that you want to extract part of the matrix and export it to excel.
The interested part of the matrix can be extracted by using square brackets and then extracted using writematrix.
You may refer the following script to understand the procedure
arr = rand(1024,100024);
writematrix(arr([1:100], [1:744]), 'out.xlsx'); % () are used for indexing and [] are used for truncation.
Please note that MATLAB supports .xls, .xlsm, .xlsx formats of excel to export to. Based on the upper limit of rows and columns, any of these can be chosen.
I hope it helps.

カテゴリ

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