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

Home » Public Forums » archive » Re: Can I do this without using loops?
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: Can I do this without using loops? [message #6321 is a reply to message #6308] Wed, 05 June 1996 00:00 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <31B59C2D.C@dundee.ac.uk>, Peter Clinch <p.j.clinch@dundee.ac.uk> writes:
> Can't quite see how, but I have a feeling there's a Better Way...
>
> I have a couple of images, same size, and I need to compare the two and
> take a result which has the highest value from either of the inputs. Ay
> the mo. I'm just using loops through all the pixels using an if greater
> than comparison, and it takes ages... :(

That is an easy one, just use the > operator.

IDL> a = [[1,2,3],[1,2,3],[1,2,3]]
IDL> b = [[3,2,1],[3,2,1],[3,2,1]]
IDL> print, a
1 2 3
1 2 3
1 2 3
IDL> print, b
3 2 1
3 2 1
3 2 1
IDL> print, a>b
3 2 3
3 2 3
3 2 3

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Call_External and the C Math Library
Next Topic: Re: another composite image question

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

Current Time: Sat Oct 11 09:46:16 PDT 2025

Total time taken to generate the page: 0.55853 seconds