element-wise vector addition
Feb 24, 2017
12:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 24, 2017
12:10 PM
element-wise vector addition
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 ?
Thank you!
juan
Solved! Go to Solution.
Labels:
- Labels:
-
Other
ACCEPTED SOLUTION
Accepted Solutions
Feb 24, 2017
03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 24, 2017
03:28 PM
3 REPLIES 3
Feb 24, 2017
03:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 24, 2017
03:26 PM
search help for "vectorize", it puts an arrow over the operation and does it element by element.
It does, however, require elements with the same number of elements. What you are asking would require programming.
Feb 24, 2017
03:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 24, 2017
03:28 PM
Which data structure do you imagine for z? A 3 x 2 matrix?
Feb 24, 2017
06:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feb 24, 2017
06:59 PM
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, that is
[A+a, A+b]
[B+a, B+b]
[C+a, C+b]
Thank you expert!
Juan
