Why cant't I save an array?

2 views (last 30 days)
Paul
Paul on 23 Jun 2014
Commented: Paul on 23 Jun 2014
I'm trying to save a 1063x1 double called ewa to a file with this line of code:
save(ewa.mat, ewa);
I get this error: Attempt to reference field of non-structure array.

Accepted Answer

José-Luis
José-Luis on 23 Jun 2014
save('ewa.mat', ewa);
  4 Comments
Joseph Cheng
Joseph Cheng on 23 Jun 2014
have you looked at the documentation for save? they have examples on its use.
The documentation shows that both inputs should be a string.
save('ewa.mat', 'ewa');
Paul
Paul on 23 Jun 2014
Thanks Joseph! It works yay oh boy

Sign in to comment.

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!