help-octave
[Top][All Lists]
Advanced

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

Re: num2str fails for negative values


From: Henry F. Mollet
Subject: Re: num2str fails for negative values
Date: Wed, 07 Sep 2005 10:03:48 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

octave:2> b=linspace(-5,5,11)
b =
  -5  -4  -3  -2  -1   0   1   2   3   4   5
octave:3> disp (num2str(b))
-5  -4  -3  -2  -1   0   1   2   3   4   5
Henry
N.B. 'b' has to be of type/class 'matrix'
rather than 'range' as created by a = -5:5
a =
  -5  -4  -3  -2  -1   0   1   2   3   4   5



on 9/6/05 11:23 PM, Madhusudan Singh at address@hidden wrote:

> Hi
> 
> I have a set of numbers between -5.0 and 5.0, and I noticed that num2str
> yields "-" for the negative numbers and the proper o/p for the positive
> numbers. How does one fix this ?
> 
> Thanks.
> 
> 
> 
> -------------------------------------------------------------
> 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]