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

Home » Public Forums » archive » Re: Strange array division problem
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: Strange array division problem [message #66278 is a reply to message #66277] Wed, 06 May 2009 19:03 Go to previous messageGo to previous message
David Klassen is currently offline  David Klassen
Messages: 27
Registered: December 2004
Junior Member
On May 5, 9:07 am, David Fanning <n...@dfanning.com> wrote:
> Dave Klassen writes:
>> This seems to do it (well, without the transpose---I assume because
>> IDL thinks of standard vectors as columns...?).
>
> No, IDL does not think of standard vectors as columns.

Hmmm...really?
IDL> a=[[2,1],[3,4]]
IDL> print,a
2 1
3 4
IDL> v=[5,6]
IDL> print,v
5 6
IDL> print,a##v
16
39
Which leads me to my original thought.

But, then again:
IDL> print,a#v
28 29

So I guess IDL figures a vector is whatever it need to be...?

Interestingly:
IDL> print,a##transpose(v)
16
39
But:
IDL> print,a#transpose(v)
% Operands of matrix multiply have incompatible dimensions: A,
<INT
Array[1, 2]>.
% Execution halted at: $MAIN$

So that's confusing.

> P.S. I'd give that result an extra pair of eyeballs
> before you turn it in for a final grade. :-)

Well, I didn't get extra eyes, but I did look long and hard, several
times, at the output and it looks like what I expect.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: remove duplicate elements from a multi-dimensional array efficiently in IDL
Next Topic: How to judge a Function's parameters ?

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

Current Time: Wed Oct 08 18:15:15 PDT 2025

Total time taken to generate the page: 0.00188 seconds