Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
save mat file with a different extension

Subject: save mat file with a different extension

From: Vihang Patil

Date: 28 Mar, 2008 08:05:05

Message: 1 of 2

Hello
I sometimes face this problem when I am developing
applications where I need to save my solutions into a MAT
file but need to rename them as *.dat or *.kon . Using save
(). I can save any mat file into *.kon
ex:
load mri
save('mri.kon','D','map','siz');
That save the above in mri.kon
But when I try to load using load() I get the following
error
load('mri.kon')
??? Error using ==> load
Unknown text on line number 1 of ASCII file
C:\MATLAB\R2006b\work\mri.kon
"MATLAB".

Please suggest.. It would be really nice if I could save
my solutions with *.kon and some other data in *.mat

Regards
Vihang

Subject: save mat file with a different extension

From: Vihang Patil

Date: 28 Mar, 2008 08:27:02

Message: 2 of 2

"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<fsi8rh$en8$1@fred.mathworks.com>...
> Hello
> I sometimes face this problem when I am developing
> applications where I need to save my solutions into a
MAT
> file but need to rename them as *.dat or *.kon . Using
save
> (). I can save any mat file into *.kon
> ex:
> load mri
> save('mri.kon','D','map','siz');
> That save the above in mri.kon
> But when I try to load using load() I get the following
> error
> load('mri.kon')
> ??? Error using ==> load
> Unknown text on line number 1 of ASCII file
> C:\MATLAB\R2006b\work\mri.kon
> "MATLAB".
>
> Please suggest.. It would be really nice if I could save
> my solutions with *.kon and some other data in *.mat
>
> Regards
> Vihang



Please ignore the above post.. I got a solution
it was
load('mri.kon','-mat')

Regards
Vihang

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us