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

Home » Public Forums » archive » How multiply two arrays in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How multiply two arrays in IDL? [message #90865] Thu, 30 April 2015 06:47 Go to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello,

I have two arrays as below:

a = [1, 2, 3, 4, 5, 6]
b = [[3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20]]

When I multiply a and b, I get the following

a * b = [3, 8, 15, 24, 35, 48]

instead of the following result

[[3, 8, 15, 24, 35, 48], [9, 20, 33, 48, 65, 84], [15, 32, 51, 72, 95, 120]]

Can anyone suggest me how I can obtain the result as desired?

Thanks in advance,
Madhavan
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Create folder below certain file
Next Topic: Copying contents of a function graphics window

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

Current Time: Wed Oct 08 13:55:19 PDT 2025

Total time taken to generate the page: 0.00451 seconds