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

Home » Public Forums » archive » Re: SIGN function: signof(num or array of num)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: SIGN function: signof(num or array of num) [message #70136 is a reply to message #70134] Tue, 16 March 2010 08:46 Go to previous messageGo to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
Ding wrote:
> IDL> a=[[1,0][-1,0]]
> IDL> print,signof(a)
> 1 0
> -1 0

Still, you should mention under RESTRICTIONS that the
input must be an integer type:

IDL> a=[[1,0],[-1,0]]
IDL> print, signof(a)
1 0
-1 0
% Program caused arithmetic error: Integer divide by 0
IDL> print, signof(double(a))
1 -32768
-1 -32768
% Program caused arithmetic error: Floating illegal operand
IDL> print, signof(complex(a))
1 -32768
-1 -32768
% Program caused arithmetic error: Floating illegal operand


chl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to read data with format codes?
Next Topic: Predefined iTool Visualization in existing iTool

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

Current Time: Sat Oct 11 02:14:53 PDT 2025

Total time taken to generate the page: 0.87936 seconds