help-octave
[Top][All Lists]
Advanced

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

RE: Qustion about data range selection


From: Klaartje en Mathieu Melenhorst
Subject: RE: Qustion about data range selection
Date: Sun, 8 Jan 2012 11:06:42 +0000

 
It didn't work; could that be due to the fact that I'm using 3.0.1?
Is there a way to solve this in 3.0.1 if that's the case?
 
Help is appreciated, Mathieu

 

From: address@hidden
To: address@hidden
Subject: RE: Qustion about data range selection
Date: Sat, 7 Jan 2012 19:04:37 +0000
CC: address@hidden

Dear Jordi,


Thank you very much for the very fast answer!
Regards, Mathieu

> Date: Sat, 7 Jan 2012 13:28:47 -0500
> Subject: Re: Qustion about data range selection
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
> On 7 January 2012 13:08, Klaartje en Mathieu Melenhorst
> <address@hidden> wrote:
> > In MathCad I used the boolean "if" to change a mathematic operation,
> > depending on the input data.
> >
> > t:=0,(pi/100)..4pi
> >
> > y(t):=|sin(t) if t<=2pi
> >          |cos(t) if t>2pi
> >
> >
> > How can this be implemented in Octave?
>
> Use the ifelse command:
>
> t = linspace(0, 4*pi, 100);
> y = ifelse(t <= 2*pi, sin(t), cos(t))
>
> HTH,
> - Jordi G. H.

_______________________________________________ Help-octave mailing list address@hidden https://mailman.cae.wisc.edu/listinfo/help-octave

reply via email to

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