Re: "sign" function

From: Verena Lili <verena.prick_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 02 2014 - 12:30:42 MDT

Thanks Brian!

On Wed, Apr 2, 2014 at 6:50 PM, Brian Medeiros <brianpm@ucar.edu> wrote:

> You could write that function:
>
> function sign( X )
> begin
> if X.eq.0 then
> result = 0
> else
> if X.gt.0 then
> result = 1
> else
> result = -1
> end if
> end if
> return( result )
> end
>
> .brian
>
>
> On Apr 2, 2014, at 10:40 AM, Verena Lili <verena.prick@gmail.com> wrote:
>
> Hi NCL,
>
> Is there any function in NCL similar like `"*sign" *function in Matlab?
>
> --
> Regards,
> Dr. Verena.
> School of Marine and Atmospheric Sciences
> Stony Brook University
> homepage: http://www.somas.stonybrook.edu/
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

-- 
Regards,
Dr. Verena.
School of Marine and Atmospheric Sciences
Stony Brook University
homepage: http://www.somas.stonybrook.edu/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 2 12:30:58 2014

This archive was generated by hypermail 2.1.8 : Thu Apr 03 2014 - 13:36:27 MDT