Desktop productivity for business analysts and programmers

Multiple two data table (matrics multiplying)

Reply
New Contributor
Posts: 3

Multiple two data table (matrics multiplying)

Hi.

How can I multiply two tables easily?
(e.g. 3x4 table multiply with 4x1 table to become 3x1 tables)

Table 1
A B C D
0 1 0 1
1 0 1 0
1 1 1 1

Table 2
a 12
b 3
c 5
d 7

Output = A*a +B*b +C*c+D*d
A B C D Output
0 1 0 1 10
1 0 1 0 17
1 1 1 1 27
Valued Guide
Posts: 2,111

Re: Multiple two data table (matrics multiplying)

That's reasonably easy to do in IML, but it is not what EGuide was designed for. Check out the SAS/IML Studio in 9.2 .
Ask a Question
Discussion stats
  • 1 reply
  • 89 views
  • 0 likes
  • 2 in conversation