save file #2

  • Follow


i'm using save function[save(filename,'var'...)]to save my variable
into a file(numbers and characters).but the contain of the file is
something weird,lots of symbols and not the thing that i expected to
get
0
Reply kahboon (11) 4/11/2008 4:40:28 PM

kahboon@gmail.com writes:

> i'm using save function[save(filename,'var'...)]to save my variable
> into a file(numbers and characters).but the contain of the file is
> something weird,lots of symbols and not the thing that i expected to
> get

That is a MAT file.  Maybe you want save(filename, 'var', '-ascii') so
you can read the contents of the file?

-Peter
0
Reply boettcher (2302) 4/11/2008 5:16:07 PM


kahboon@gmail.com wrote in message
<cec6a014-4989-417f-81bc-2ac59ea97d96@s39g2000prd.googlegroups.com>...
> i'm using save function[save(filename,'var'...)]to save my
variable
> into a file(numbers and characters).but the contain of the
file is
> something weird,lots of symbols and not the thing that i
expected to
> get

Maybe can you tell uss what you expected to then...
Save by default save in MAT format that you can read only in
MATLAB with load.
Maybe you can try the '-ascii' option of save but only for
numbers...

0
Reply caro954701 (319) 4/11/2008 5:21:02 PM

On Apr 12, 1:21=A0am, "French Caro " <caro95...@nospam.free.fr> wrote:
> kahb...@gmail.com wrote in message
>
> <cec6a014-4989-417f-81bc-2ac59ea97...@s39g2000prd.googlegroups.com>...
>
> > i'm using save function[save(filename,'var'...)]to save my
> variable
> > into a file(numbers and characters).but the contain of the
> file is
> > something weird,lots of symbols and not the thing that i
> expected to
> > get
>
> Maybe can you tell uss what you expected to then...
> Save by default save in MAT format that you can read only in
> MATLAB with load.
> Maybe you can try the '-ascii' option of save but only for
> numbers...

ya.before that is already try the'-ascii'.i want to save a matrix with
characters and the numbers into text file.Is it possible?
0
Reply kahboon (11) 4/11/2008 11:10:27 PM

On Apr 12, 1:16=A0am, Peter Boettcher <boettc...@ll.mit.edu> wrote:
> kahb...@gmail.com writes:
> > i'm using save function[save(filename,'var'...)]to save my variable
> > into a file(numbers and characters).but the contain of the file is
> > something weird,lots of symbols and not the thing that i expected to
> > get
>
> That is a MAT file. =A0Maybe you want save(filename, 'var', '-ascii') so
> you can read the contents of the file?
>
> -Peter

both the numbers and characters in the matrix is save in class of
'char'.the '-ascii' is only for numbers,right?
0
Reply kahboon (11) 4/11/2008 11:28:21 PM

kahboon@gmail.com wrote in message
<2a003792-c2e6-4595-a88b-8a511cf5cc3d@q27g2000prf.googlegroups.com>...
> On Apr 12, 1:21=A0am, "French Caro "
<caro95...@nospam.free.fr> wrote:
> > kahb...@gmail.com wrote in message
> >
> >
<cec6a014-4989-417f-81bc-2ac59ea97...@s39g2000prd.googlegroups.com>...
> >
> > > i'm using save function[save(filename,'var'...)]to save my
> > variable
> > > into a file(numbers and characters).but the contain of the
> > file is
> > > something weird,lots of symbols and not the thing that i
> > expected to
> > > get
> >
> > Maybe can you tell uss what you expected to then...
> > Save by default save in MAT format that you can read only in
> > MATLAB with load.
> > Maybe you can try the '-ascii' option of save but only for
> > numbers...
> 
> ya.before that is already try the'-ascii'.i want to save a
matrix with
> characters and the numbers into text file.Is it possible?

Yes it is possible but you'll have to use low file I/O :
fopen, fprintf...See the help for those functions.

0
Reply caro954701 (319) 4/14/2008 5:50:17 PM

5 Replies
33 Views

(page loaded in 0.11 seconds)

Similiar Articles:
















6/22/2012 2:30:29 AM


Reply: