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

Home » Public Forums » archive » working of the '*' operator in IDL in the context of arrays and matrices
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
working of the '*' operator in IDL in the context of arrays and matrices [message #36231] Thu, 28 August 2003 09:27
iqbal_hassan is currently offline  iqbal_hassan
Messages: 6
Registered: August 2003
Junior Member
Hi Group Members,
I am working with IDL for some time. I have some doubts which are
here:
I have this line of code:

A= (y1-y2)*weights#pder

where y1= one dimensional array of 'n' elements
y2= one dimensional array of 'n' elements
weights= one dimensional array of 'n' elemnts
pder= partial derivative matrix of order 4 by 'n'(4 rows 'n'
columns)

Now how the multiplication of one dimensional array with a matrix is
acieved. what I read from IDL documents is that first pder matrix is
transposed then it is multiplied with the array. If that is the case
then an 'n' element array is to be multiplied with 'n' by 4 matrix.
but '#' operator needs the second matrix to have the same number of
columns as the first matrix has number of rows.
So my doubt is how this condition is being achieved in the above line
of code?

Another related doubt is:

B= transpose(pder)#(weights#(fltarr(m)+1)*pder)

'pder' and 'weights' are as defined above. now 'fltarr(m)'
is an 'm' element array initialized to '1'. since '*' is higher in the
operator precedence list so this 'm' elements one-dimensional array
will be multiplied to 'pder' which is a '4 X n' matrix. so what will
be resultant array or matrix like?

Please help me with this doubt. I am not able to understand how '*'
operator works with matrix and arrays.

Looking forward to your response.
Thanking you,
Hassan Iqbal
Pune, India
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Code Metrics tools for IDL
Next Topic: array 'minus'

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

Current Time: Wed Oct 08 17:18:51 PDT 2025

Total time taken to generate the page: 0.00501 seconds