help-octave
[Top][All Lists]
Advanced

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

str2num


From: lad
Subject: str2num
Date: Sun, 2 Apr 2006 11:52:56 +0200 (CEST)
User-agent: SquirrelMail/1.4.3a

Dear All

I am trying import some data into octave. I have a strange problem in
doing that. I can not get the str2num to work as I think it should work.

I read my data from a file with fgets (whic returns a string) and the I
would like to change the string to numbers.

look at the following minimal example wich reproduce my error:

> x="123456"
x = 123456

> ischar(x)
ans = 1

> y=str2num(x)
y = [](0x0)

I the last intry i would have expected a number or matrix.
What am i doing wrong here?

I use Ocatve workshop on win XP (and Me).

Best

Lars






-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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