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

Home » Public Forums » archive » Re: Please explain this if you can: (short)
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: Please explain this if you can: (short) [message #3211 is a reply to message #3210] Mon, 05 December 1994 04:58 Go to previous messageGo to previous message
greec is currently offline  greec
Messages: 2
Registered: November 1994
Junior Member
In article <Pine.SOL.3.91.941202142557.14825A-100000@chroma> Russ Welti <rwelti@chroma.mbt.washington.edu> writes:
> Try this:
>
> IDL> a=bytarr(20)
> IDL> a(3)=244
> IDL> print,min(a)
> 0
> IDL> print,max(a)
> 244
> IDL> print,abs(max(a)-min(a))
> 12
> IDL> print,max(a)-min(a)
> 244
>

What is happening is that the bytes are being treated as signed
numbers. When you execute the 'print,abs(max(a)-min(a))'.
You get the same thing happening when you do
WAVE> print, sqrt((max(a)-min(a))*(max(a)-min(a)))
12.0000
Don't know if this is any help at all. But it does explain
what is happening.

Chris
greec@essex.ac.uk
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: how to calculate a running total of a vector
Next Topic: WIDGET_TEXT

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

Current Time: Wed Oct 08 19:37:25 PDT 2025

Total time taken to generate the page: 0.00388 seconds