Saving matrix that contains cell arrays

1 Ansicht (letzte 30 Tage)
Louise Wilson
Louise Wilson am 19 Apr. 2021
Kommentiert: David Hill am 20 Apr. 2021
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'

Antworten (1)

David Hill
David Hill am 19 Apr. 2021
writetable(gps,'gps_table.mat');
  2 Kommentare
Louise Wilson
Louise Wilson am 19 Apr. 2021
>> 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 am 20 Apr. 2021
Sorry, this should work.
save('gps_table.mat','gps');
Alternatively
writetable(gps,'gps_table.txt');

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by