Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
I'm having difficulty having my Mathcad Prime 3.0 sheet perform calculations containing vectors.
The attached documents indicate my issue. For example, if I define a range variable, i, and a column vector, s'_u that I want to reference in my preceding calculations, I would like to say that alpha is calculated each time there is a s'_u value...thus making the calculated alpha variable a column vector of equal size. I hope my problem makes a little more sense once you take a look at the attached sheets.
Solved! Go to Solution.
Also, here's an alternative solution without the need to define any range variable. It utilizes the "vectorization" modifier.
Hello
You start your program with a loop
For i €1, 2.4
If I'm not mistaken?
Kind regards.
Denis.
I seem to recall there being an issue if you use the in-line evaluation after defining "i". Try leaving your definition as i:=1,2..4 and leave off the evaluation equals sign at the end.
With the in-line evaluation, I believe Mathcad converts the range variable into a matrix.
Also, I just noticed that you defined i as 1-4, but you did not set ORGIN as 1 (note s'u[3/pa = 1.777, which is the fourth term in s'u/pa). You either need to set ORIGIN:=1, or define i as 0..4.
It appears the in-line evaluation was not the issue. Only your definition of i or ORIGIN:
Also, here's an alternative solution without the need to define any range variable. It utilizes the "vectorization" modifier.
Thanks for all the help. You solutions and improvements to the worksheet have helped a lot!
I made some changes and it seemed that changing the range variable so it didn't behave like a column vector was the solution (I removed the "=" after defining "i").