The behaviour of the evaluation operator (=) changed in Mathcad Prime 10.
Previously, when defining a range, using the = operator converted the range into a vector. In Mathcad 10 it no longer does so; hence the error message when you try to use n.
You will have to explicitly define n as a vector, or create a function to convert a range variable to a vector. Try the vec function defined in this link:
Stuart already explained why this problem occurs in P10 and how to solve it.
Inline evaluation does not convert a range into a vector starting with Prime 10. So even though you use inline eval, n remains to be a range and so the assignment to variable beta fails.
PTC's decision to make the (admittedly illogical and inconsistent) option of converting a range to a vector impossible without providing a more sensible inbuilt alternative is regrettable.
In case you are still unsure here your file in a working variant.
I used a simpler variant of a range-to-vector function, for more capable and sophisticated versions follow Stuart link.
Of course you could also define n as a vector right away. Either using a global range variable
or using a programmed for-loop
In some threads in this forum you will also find user-defined functions to create a vector by providing first, second and last value (similar to the definition of a range) or also by providing first value, step value and either last value or number of entries.
I should like to add a more concise method to create a simple vector with successive values:
(The matrix function creates a vector (5 elements vertical, one column in the above case), with values 0, 1, 2... then 2 is added;. the inline evaluation is not necessary, but used here to show the expression creates the correct vector.)
Success! Luc
Translate
Windchill Satisfaction Survey
Help shape the future of Windchill. Take our 5-minute survey and share your feedback.