Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I'm just trying to make a vector from a function so that I can export the values
However MathCad Prim 8.0 give the error "This value must be a scalar or a matrix". Why???
Needless to say, not having the ability to just select all values from an array and copying and pasting, like it was possible in MathCad 15 is really, really annoying
Solved! Go to Solution.
Hi,
T in your sheet is a range variable and subsequent expressions use it as a column vector and this generates error.
There are two ways to create the column vector T
The "official way" is to create a range variable and use the range variable to create the column vector T. see Version 2 file below.
The "undocumented" way is to simply use the inline equal sign after the creation of the range variable T that turns T into a column vector.
Cheers
Terry
Hi,
Please upload your sheet so problem can be solved.
From first glance BBi:=AA(T)i put an "i" subscript to AA(T)
Cheers
Terry
Hi,
T in your sheet is a range variable and subsequent expressions use it as a column vector and this generates error.
There are two ways to create the column vector T
The "official way" is to create a range variable and use the range variable to create the column vector T. see Version 2 file below.
The "undocumented" way is to simply use the inline equal sign after the creation of the range variable T that turns T into a column vector.
Cheers
Terry
You defined T as a range and a range is something which unfortunately is displayed in Prime like a vector but its something completely different. A rang is some kind of implicit loop.
So AA(T) is neither a range nor a vector - its some kind of invalid Prime object. You may notice that you can't assign it a variable by writing variable:=AA(T). You will get an error.
One way to et what you seem to be looking for is defining T as a vector. And easy way (but undocumented) is to follow the range definition by a numeric inline evaluation (=). This turns the range into a vector.
Not you can use this vector as argument for your function AA. In case of your function its not mandatory, but it is sure good habit to use vectorization. The range i is not necessary with this approach.
You may also use your range i, but have to do it in this way:
Worksheet attached