Saving matrix that contains cell arrays

조회 수: 4 (최근 30일)
Louise Wilson
Louise Wilson 2021년 4월 19일
댓글: David Hill 2021년 4월 20일
Can anyone tell me the best way to save a large file that looks like this? I will be sharing it with colleagues to use in Matlab.
I have tried
save gps_table.mat gps %gps is name of variable
but this doesn't work, it tells me 'Cannot import from an empty input file'

답변 (1개)

David Hill
David Hill 2021년 4월 19일
writetable(gps,'gps_table.mat');
  댓글 수: 2
Louise Wilson
Louise Wilson 2021년 4월 19일
>> writetable(gps,'gps_table.mat');
Unrecognized file extension '.mat'. Use the 'FileType' parameter to specify the file type.
>> writetable(gps,'gps_table','FileType','.mat');
Unrecognized file type '.mat'. The 'FileType' parameter must be 'text' or 'spreadsheet'.
>>
Thank you! Unfortunately it doesn't work
David Hill
David Hill 2021년 4월 20일
Sorry, this should work.
save('gps_table.mat','gps');
Alternatively
writetable(gps,'gps_table.txt');

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

카테고리

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