help-octave
[Top][All Lists]
Advanced

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

Re: str2num


From: Henry F. Mollet
Subject: Re: str2num
Date: Mon, 03 Apr 2006 18:15:07 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

Also works as expected on my Mac OS X 10.4.5.
Henry

GNU Octave, version 2.1.71 (powerpc-apple-darwin8.1.0).
octave:1> x="123456"
x = 123456
octave:2> ischar(x)
ans = 1
octave:3> y=str2num(x)
y = 123456
octave:4> 



on 4/2/06 3:24 AM, Michael Grossbach at address@hidden wrote:

> Works as expected with my installation of octave-workshop. Maybe you
> have unwillingly edited the contents of str2num.m?
> 
> Regards, Michael
> 
> address@hidden wrote:
>> 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
> -------------------------------------------------------------
> 




-------------------------------------------------------------
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]