help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: File ASCII


From: Allen.Windhorn
Subject: RE: File ASCII
Date: Wed, 23 Apr 2008 11:40:38 -0500

Alessandro,

> -----Original Message-----
> From: Alessandro Bandera [mailto:address@hidden 
> 
> It works!
> For instance be the (3,3) matrix name M. I make save -ascii M.
> Otave writes M in the Octave directory. Or save -ascii M.txt
> and Octave writes M.txt, or save -ascii M.asc(or .ans) it
> writes M.asc. While save -txt M, Octave writes -txt....don't
> know.

Should be "-text" not "-txt".

> If you want, look up the attached file where, for some 
> strange reason, there a lot of other numbers that don't make 
> sense, no problem I delete them with the editor.

----------
1.00000000e+000 2.00000000e+000 3.00000000e+000
 4.00000000e+000 5.00000000e+000 6.00000000e+000
 7.00000000e+000 8.00000000e+000 9.00000000e+000
 0.00000000e+000
 6.70000000e+001 5.80000000e+001 9.20000000e+001 6.80000000e+001
1.11000000e+002 9.90000000e+001 1.17000000e+002 1.09000000e+002
1.01000000e+002 1.10000000e+002 1.16000000e+002 1.15000000e+002
3.20000000e+001 9.70000000e+001 1.10000000e+002 1.00000000e+002
3.20000000e+001 8.30000000e+001 1.01000000e+002 1.16000000e+002
1.16000000e+002 1.05000000e+002 1.10000000e+002 1.03000000e+002
1.15000000e+002 9.20000000e+001 6.50000000e+001 1.08000000e+002
1.01000000e+002 1.15000000e+002 1.15000000e+002 9.70000000e+001
1.10000000e+002 1.00000000e+002 1.14000000e+002 1.11000000e+002
9.20000000e+001 7.70000000e+001 1.21000000e+002 3.20000000e+001
6.80000000e+001 1.11000000e+002 9.90000000e+001 1.17000000e+002
1.09000000e+002 1.01000000e+002 1.10000000e+002 1.16000000e+002
1.15000000e+002 9.20000000e+001 1.11000000e+002 9.90000000e+001
1.16000000e+002 9.70000000e+001 1.18000000e+002 1.01000000e+002
----------

It may be that you are saving ALL of the variables.  If you only want
one variable (your matrix), you have to put the variable name after the
file name.  Otherwise you might want to check the Matlab documentation
on this, since it is their format.

> I only have some problem with the path, Octave does not 
> recognize the path even if I put it into "...", I'll see on 
> the manual.

If you are using Windows, you have to use forward slashes or double
backslashes.  I think you only need quotes if there are spaces in the
filename.  I had a lot of trouble with this, still haven't quite figured
it out.

> Anyway while importing into excel I must change the decimal 
> separator into the txt file before, otherwise excel does not 
> recognize the decimal separator even if ,while importing, I 
> set the dot as decimal separator..don't know.

When I imported, I had to use Excel "text to columns" to get the values.

Maybe some kind soul will make a "save -xls" or "save -csv" command for
us :-)  

Regards,
Allen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]