Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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.
Solved! Go to Solution.
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?
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?
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.
Please find regarding mathcad sheet enclosed.
Thank you so much in advance
Best Regards
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
Hi,
Thank you for the reply, but when I try to do your suggestion I am having below given warning.
Can you please take a look shared mathcad sheet?
Best Regards
Fuat
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
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