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

Home » Public Forums » archive » tensor multiplication
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: tensor multiplication [message #20158 is a reply to message #20082] Thu, 18 May 2000 00:00 Go to previous messageGo to previous message
Daniel Luebbert is currently offline  Daniel Luebbert
Messages: 6
Registered: May 2000
Junior Member
Hi,

ok, thanks for the various answers.
In case anybody should be interested in the future,
I'll leave here a little program which I have now written
to perform a general multiplication of a
[ N_1, N_2, ...., N_n]-array with a N_n -vector.
The result is a [N_1, N_2, ... , N_(n-1)]-array:



function tensor_product,a,b

sa = size(a)
a_matrix = reform(a,total_product(sa[1:sa[0]-1]),sa[sa[0]])
result = a_matrix # b
result = reform(temporary(result),sa[1:sa[0]-1])

return,result
end



Daniel
------------------------------------------------------------ ------------
Daniel Luebbert
Stanford Synchrotron Radiation Laboratory (SSRL)
luebbert@slac.stanford.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [XYZ]MINOR and /XLOG, /YLOG
Next Topic: Re: returning values from widget hierarchy

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

Current Time: Thu Oct 16 23:25:06 PDT 2025

Total time taken to generate the page: 1.60006 seconds