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

Home » Public Forums » archive » Ternary Operator for 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
Ternary Operator for Arrays [message #39534] Tue, 25 May 2004 12:07
jack.c.yin is currently offline  jack.c.yin
Messages: 5
Registered: January 2004
Junior Member
Does anyone know of a good clean way of doing ternary operation on
arrays without using FOR loops and nested IF statements?

For example, I have three arrays A, B and C and I want to do A = B /
C, but there are elements in C that are zeros and I want to set the
corresponding elements in A to zeros without actually doing the
division to avoid divide by zero error. The ternary operator (?:)
only works on scalers. Is there something comparable for arrays?

Any help would be greatly appreciated!

Jack
[Message index]
 
Read Message
Previous Topic: Envi Query
Next Topic: Re: Advice on data transfer -- PC to Sun

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

Current Time: Fri Oct 10 03:50:15 PDT 2025

Total time taken to generate the page: 1.03502 seconds