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

Home » Public Forums » archive » Re: Need efficient routine to calculate max of two arrays
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: Need efficient routine to calculate max of two arrays [message #3429 is a reply to message #3427] Tue, 24 January 1995 17:29 Go to previous messageGo to previous message
mallozzi is currently offline  mallozzi
Messages: 60
Registered: August 1994
Member
|> There are two arrays: a and b of equal length, I want to calculate
|> an array c of the same length so that:
|> c(i) = min(a(i),b(i))

Try this:

IDL> a = [1., 2, 3, 4, 5]
IDL> b = [1., 2, 3, 2, 1]
IDL> c = a < b
IDL> print, a
1.00000 2.00000 3.00000 4.00000 5.00000
IDL> print, b
1.00000 2.00000 3.00000 2.00000 1.00000
IDL> print, c
1.00000 2.00000 3.00000 2.00000 1.00000

mallozzi@ssl.msfc.nasa.gov
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: emacs and IDL (typos in URLs)
Next Topic: floating pt. sliders....

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

Current Time: Fri Oct 10 06:47:42 PDT 2025

Total time taken to generate the page: 1.59980 seconds