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

Home » Public Forums » archive » Matrix multiplication again...
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
Matrix multiplication again... [message #80093] Mon, 07 May 2012 08:40
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
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,*]

for all i.

Clearly I can do this by looping over i and performing the calculation one pixel at a time. But this must be really inefficient so maybe somebody has written a subroutine that does this "the IDL way"? For a small matrix M I can imagine looping over the matrix elements and adding matrix elements "one image at a time"? But if the matrix dimensions are comparable to (or even larger than!) the image dimensions it is not clear to me that it would be any faster.

Suggestions?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Video input
Next Topic: IDL 8.1 error messages

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

Current Time: Thu Oct 09 23:01:53 PDT 2025

Total time taken to generate the page: 0.71971 seconds