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

Home » Public Forums » archive » Matlab Syntax
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Matlab Syntax [message #37146] Mon, 17 November 2003 17:45
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Speaking of Matlab syntax (which I am beginning to like,
by the way), here is one I find confusing. Any Matlab
users out there in IDL-land?

y(2*x(IDX==0))=[];

IDX is a vector, I think. The variables x and y
are vectors for sure. I realize IDL doesn't
have a null array, but my best guess about this
translation is something like this.

I = Where(IDX EQ 0, count)
IF count GT 0 THEN y[2*x[I]] = !Values.F_NAN

Is that close?

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Matlab Translations -- Was: filtering images in the fourier domain
Next Topic: LINE-FOLLOWING ALGORITHM/ROUTINE

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

Current Time: Tue Dec 02 14:35:47 PST 2025

Total time taken to generate the page: 0.00277 seconds