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

Home » Public Forums » archive » simple array math question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
simple array math question [message #33713] Thu, 16 January 2003 12:05 Go to previous message
Sean Raffuse is currently offline  Sean Raffuse
Messages: 46
Registered: July 2001
Member
Hello.

Here is what I believe will be a pretty simple question.

>> a=[[1,2,3],[4,5,6],[7,8,9]]

>> b=[1,2,3]

What is the best (read, fastest) way to multiply b by each individual row of
a? I would like to return a result of:

[[1,4,9],[4,10,18],[7,14,27]]

assuming my arithmatic is correct.


Thanks in advance,

Sean Raffuse
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Polyfill, z-buffer & postscript
Next Topic: True size of a gzip compressed file?

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

Current Time: Wed Oct 08 13:07:45 PDT 2025

Total time taken to generate the page: 0.00367 seconds