comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » step function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
step function [message #76760] Tue, 05 July 2011 09:24 Go to next message
sid is currently offline  sid
Messages: 50
Registered: January 1995
Member
Hi all,
Please let me know if there is any standard program to use step
function.
thank you
Sindhuja
Re: step function [message #76764 is a reply to message #76760] Tue, 05 July 2011 07:33 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 7/5/11 4:07 am, sid wrote:
> Hi all,
> Is there a standard programme for using step function in idl.
> If so please let me know.
> thank you
> Sid

You can use the comparison operators directly (maybe with some
arithmetic). Like:

y = x gt 5.

This makes the value of y be 1. for values of x greater than 5. and 0.
otherwise (i.e., less than or equal to 5.). If you don't want the value
of the step-function to be 0. and 1., then use some arithmetic:

y = (x gt 5) * (large_value - small_value) + small_value

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
Re: step function [message #76856 is a reply to message #76760] Tue, 05 July 2011 13:37 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Jul 5, 12:24 pm, sid <gunvicsi...@gmail.com> wrote:
> Hi all,
>        Please let me know if there is any standard program to use step
> function.
> thank you
> Sindhuja

In what context do you want to use a step function?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: netnews for reading this group
Next Topic: Type conversion error: Unable to convert given STRING to Float.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:49:25 PDT 2025

Total time taken to generate the page: 0.00527 seconds