MATLAB Answers

Saving matrix that contains cell arrays

9 views (last 30 days)
Louise Wilson
Louise Wilson on 19 Apr 2021 at 22:17
Commented: David Hill on 20 Apr 2021 at 0:09
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'

Answers (1)

David Hill
David Hill on 19 Apr 2021 at 22:45
writetable(gps,'gps_table.mat');
  2 Comments
David Hill
David Hill on 20 Apr 2021 at 0:09
Sorry, this should work.
save('gps_table.mat','gps');
Alternatively
writetable(gps,'gps_table.txt');

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!

Translated by