|
When you saved the matrix it saved it in MATLAB's binary format. When you try to load it it sees that the extension is not .mat and assumes it is an ASCII file.
A couple of quick fixes:
To load the matrix you saved using
save Yavg_Wc.dat B;
try:
load('Yavg_Wc.dat','-mat') %the mat switch forces it to see the file as a .mat file
In the future if you want to save the data as ASCII data then:
save('Yavg_Wc.dat','B','-ascii')
In this case
load('Yavg_Wc.dat') will work.
There are some limitations to saving ASCII data so you should read the docs at
doc save
Hope this helps
Matt
"dhuan Du" <dupeony@gmail.com> wrote in message <gv4fee$h51$1@fred.mathworks.com>...
> I use the command "save" to save some data in cell matrics after I run my code.
>
> The code is as below:
>
> save Yavg_Wc.dat B; % B is a cell matrics in my code.
>
> Now, I would like to check the data in A, then I use the command line below:
>
> load Yavg_Wc.dat;
>
> But I got the error like below
>
> load Yavg_Wc.dat;
> ??? Error using ==> load
> Number of columns on line 1 of ASCII file
> N:\Personal\MATLAB\Disastercode\matlab\Yavg_Wc.dat
> must be the same as previous lines.
>
> What shall I do and how can I check the data in Yavg_Wc.dat?
>
> Thanks,
>
> Lili
|