Skip to main content
10-Marble
June 14, 2024
Solved

how to do element product in two column vectors?

  • June 14, 2024
  • 2 replies
  • 2132 views

In mathCAD prime 10,

 

how to do element product in two column vectors?

 

For example,

 

A := [1 2 3]

B :=[4 5 6]

 

I want to have C=[4 10 18]. In this case, how can I express it in mathCAD?

Please help me!

Best answer by Werner_E

You have to use "vectorization"!

Werner_E_1-1718344070332.png

Prime 10 file attached

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
June 14, 2024

You have to use "vectorization"!

Werner_E_1-1718344070332.png

Prime 10 file attached

10-Marble
June 14, 2024

Thanks a lot!

 

but I have another issue.

 

Here is my worksheet.

 

N:= 50     n := 0..N-1

 

w(s) := cos(2*pi*n)

 

f0(s) :=sin(10*n)

 

I need to do element product here.

 

Vectorizing f0(s)*w(s) doesn't work. 

24-Ruby III
June 14, 2024

Hi,

n := 0..N-1

your n  is not vector, it is a range.

24-Ruby III
June 14, 2024

MartinHanak_0-1718343775282.png

MartinHanak_1-1718343788998.png