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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

4-Participant

## How To Multiply Each Cell Of The Array By Exponential Range Variables

Hi,

I have been trying to multiply each cell of the array by exponentially range variables.

To illustrate: first cell of the matrix should be multiply by 2, second row of the array should be multiply by 2^2, third row of the array should be multiply by 2^3 and so on... Below illustrated EL(GR) should have seen: First row;1.06, second row should have been 1.06^2, third row should have been 1,06^3 and so on. I would appreciated if you help me to sort this out... Regarding Mathcad sheet is also enclosed.

1 ACCEPTED SOLUTION

Accepted Solutions

You are asking for something contradictory! First you write that you want to multiply the value by 1,2,2^2, etc but later you want to take them to the power of 1,2,3, etc. You have to decide what you are looking for!

Not sure, are you looking for one of the following two variants or for something completely different?

7 REPLIES 7

You are asking for something contradictory! First you write that you want to multiply the value by 1,2,2^2, etc but later you want to take them to the power of 1,2,3, etc. You have to decide what you are looking for!

Not sure, are you looking for one of the following two variants or for something completely different?

4-Participant
(To:Werner_E)

First of all, thank you for your quick respond and this is much appreciated.

I am so sorry for the conrtadiction yes you are right. What I want to do is as you illustrated in the EL3(GR).

But now another issue has emerged. How am I supposed to multiply FE(l1) and EL(GR) element by element? When I do this as expected I am having just a scaler result. But what I am trying to have is, first row of the FE(l1) should be multiply with the first row of the EL(GR) and so on. The resultant array should be a matrix with the same row number of the multipliers.

Thank you so much in advance

Best Regards

23-Emerald III
(To:fuatkabakcioglu)

Use the vectorize operator. Select your multiplication and press [CTRL-_]  (That is: The Control key and the underscore key). That should result in an arrow above the multiplication, and tells Mathcad to multiply elements  of the vectors, element by element.

Success!
Luc

4-Participant
(To:LucMeekes)

Hi,

Thank you for the reply, but when I try to do your suggestion I am having below given warning.

Best Regards

Fuat

23-Emerald III
(To:fuatkabakcioglu)

The arguments of the multiplication must be vectors (of the same size).

Make sure your FE function returns a Vector, the same size as the EL function gives.

Success!
Luc

4-Participant
(To:LucMeekes)

Hi,

Thank you for your quick respond and help. Whereas I have been trying to sort this out almost for 3 hours and I traced the error. The reason of the error is as I red boxed in the below given screenshot. It shows that the mistake is in the for loop but I dont know how to sort this out. I would really appreciated if you help me to solve this.

Best Regards

Fuat

Here is one possible way to do it

I have used the programming facility and local assignments but of course you may also use assignments on worksheet levels, especially if you need those vectors later anyway

Announcements
Top Tags