help-octave
[Top][All Lists]
Advanced

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

Re: define range in octave


From: Jordi Gutierrez Hermoso
Subject: Re: define range in octave
Date: Tue, 25 Jul 2006 16:22:34 -0500

Hi.

On 25/07/06, Aarti Gupta <address@hidden> wrote:
I want range as (0-5), (5-15), (15-25),(25-35), (35-45)

I don't quite understand what you want. The colon operator will define
a range for you, so that, e.g.

octave:1> x = 1:10
x =

  1   2   3   4   5   6   7   8   9  10

and you can specify a different step size, but the default is 1:

octave:2> x = 1:pi/2:10
x =

  1.0000   2.5708   4.1416   5.7124   7.2832   8.8540

Those are five different ranges you have there. The first one could be
x=0:5, the next y = 5:15, and so on. What's the context? What are you
trying to do?

- Jordi G. H.


reply via email to

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