cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

element-wise vector addition

jsuarez
1-Newbie

element-wise vector addition

WE & Fred thank you very much for answering the question, specially to WE.

WE, is it possible to get the answer in the following format? Thank you

Header 1Header 2Header 3
ab
AA+aA+b
BB+aB+b
CC+aC+b

Original question

Hi, is it possible in Mathcad 15 or Prime to do a vector element by element addition that takes as input 2 vectors for example,vector x = [ A,B,C ] and y = [ a,b ] and has as output z = A+a, A+b, B+a, B+b,C+a & C+b ?

1 ACCEPTED SOLUTION

Accepted Solutions

Had not seen your previous reply.

Here you are:

View solution in original post

4 REPLIES 4

Not being a spreadsheet, Mathcad is not really good in making nicely formatted tables with headers..

Does the attached help?

Hi Wegner,

Your are really and expert in programming in Mathcad. Can you address please the final question in my first post. This is  what I wrote back then in my first post

Hi WE, thank you very much for your excellent answer. Since you are asking me I  prefer if the 3X2 matrix would be 3  1x2 matrix,

[A+a, A+b]

[B+a, B+b]

[C+a, C+b]

Your previous two solutions are elegant, but I basically prefer the output as 3 separated matrices as shown above.

Thank you very much.

juan

Had not seen your previous reply.

Here you are:

Awesome Wegner!  thank you.

Top Tags