How do I export data to a file?

조회 수: 19 (최근 30일)
Daniel
Daniel 2025년 4월 21일
댓글: Star Strider 2025년 4월 21일
Hello,
I'm getting out of memory errors when trying to copy a large dataset (9003x9003 double) using Ctrl+C with the intention of pasting it to Excel, even though I've increased the Java Heap memory to the maximum. The error window suggests copying portions (I'm not doing that with such a large dataset) or exporting the dataset to a file - how do I do that please? I would expect such an option in its right-click menu but it's not there - i.e. let's make the paid software as complicated as we can :)))
xlswrite leaves me with empty files, csvwrite with corrupt files - even though it's plain data
Thank you

채택된 답변

Star Strider
Star Strider 2025년 4월 21일
If the data are in a matrix that are assigned to one or more variables, first use the save function to save t he variables to a .mat file. That will guarantee that you have a backup for it.
Second, use the writematrix (or writetable if it is already a table) functions to write it to a .txt of .xlsx file. You might be able to do that from the Command Wiindow. If not, you can load the .mat file and then write it.
  댓글 수: 2
Daniel
Daniel 2025년 4월 21일
편집: Daniel 2025년 4월 21일
Thank you ^^
Why isn't there a simple Export button though? 🥺
Star Strider
Star Strider 2025년 4월 21일
As always, my pleasure!
That there isn’t an Export button is a MathWorks design decision. I suggest that you Contact Support and suggest that option be added. I believe it would be useful.
Include the URL of this thread in your note to MathWorks so that you don’t have to repeat everything you wrote here.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by