help-octave
[Top][All Lists]
Advanced

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

Re: Question about Range class


From: Robert A. Macy
Subject: Re: Question about Range class
Date: Tue, 22 Nov 2005 11:17:44 -0800

>From a newbie and untested...

double z[100];

for (int i = 0; i < 100; i++)
  z[i] = 0.1 + ( static_cast<double>(i) )/10.0;



Keep in mind the first array member is at the index of 0 in
C++, but the above will make the values correct.  

         - Robert -



On Tue, 22 Nov 2005 16:27:32 +0100 (CET)
 Marek Szczypinski <address@hidden> wrote:
> Hello,
> how should I write
> z = [ 0 : 0.1 : 10 ] in c++?
> thanks,
> marek
> 



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