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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Unequal vector multiplication

Gaz_Ball
6-Contributor

Unequal vector multiplication

I have a 4 row vector (A) and a 2 row vector (B) and I want to multiply the 1st two row elements of (A) each by the first element of (B) and the 3rd & 4th row elements of (A) each by the 2nd row element of (B). I want to do this element by element to give me a 4 row vector at the end. It's made more complicated by the fact the numbers of rows in both vectors can change although (A) will always have twice the number of rows as (B). I thought of trying to match the number of rows in (B) to (A) so I can simply multiply the two but not sure how to go about this. 

 

Any help appreciated. 

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Gaz_Ball)

Here is a function which should do the job:

Werner_E_0-1663023943962.png

MC15 sheet attached

View solution in original post

2 REPLIES 2
Werner_E
25-Diamond I
(To:Gaz_Ball)

Here is a function which should do the job:

Werner_E_0-1663023943962.png

MC15 sheet attached

Gaz_Ball
6-Contributor
(To:Werner_E)

Thanks very much Werner, that works exactly how I was hoping it would!

 

I've only been using Mathcad/Prime for a relatively short time so it's great that this forum exists to help people out.

Announcements

Top Tags