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

Home » Public Forums » archive » Re: Matrix multiplication again...
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: Matrix multiplication again... [message #80067 is a reply to message #80064] Tue, 08 May 2012 11:45 Go to previous messageGo to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den tisdagen den 8:e maj 2012 kl. 20:08:02 UTC+2 skrev Yngvar Larsen:
> On Monday, 7 May 2012 17:40:49 UTC+2, Mats Löfdahl wrote:
>> Suppose I have an image (let's say 128x128=16384 pixels) and for each pixel there is a vector with maybe 100 (could be more) elements. I organize this as a variable x with 16384 by 100 elements.
>>
>> Suppose I also have a 100x100 matrix M (or in general not symmetric but nevermind) and I want to calculate y, which is then also a 16384 by 100 array where
>>
>> y[i,*] = M ## x[i,*]
>
> Why don't you simply use: y = M##x ?

Probably because I kept thinking of x as a 3D array, in spite of having reformed it to 2D...

> Should work fine.

Yes, I see that now. Thanks!

> "rows" and "columns" are rather confusing terms in IDL...

I know! I've opted to organize my code so I can always use the ## operator for matrix multiplication. Seems to work so far.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: mpfit and analytical derivative debugging
Next Topic: Writing large datasets in HDF5 file fails

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

Current Time: Fri Oct 10 05:44:25 PDT 2025

Total time taken to generate the page: 0.88212 seconds