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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Value must be a scalor or a matrix

DS_10024912
12-Amethyst

Value must be a scalor or a matrix

I'm not really sure what is wrong with my document.   If I simply evaluate the function ZL() I get a vector output (or what I'd call a vector - matrix with one column).  When I take the same function and assign to a variable I get the error screen captured below.  

 

Is there a way to explicitly define a variable to be a vector or matrix?   Or, is that not the problem?  I've attached the Mathcad Prime document.

 

mathcad_must_be_a_scalar.jpg

 

 

EDIT:  Looks like the issue might be because I'm using a range variable (see link below).   So, how do I convert a range variable to a matrix/vector variable?

 

https://support.ptc.com/help/mathcad/r8.0/en/index.html#page/PTC_Mathcad_Help/range_variables.html

 

1 ACCEPTED SOLUTION

Accepted Solutions
ttokoro
20-Turquoise
(To:DS_10024912)

You need a range to vector magic,image.png
after the definition of range Wt 

image.png

Then, you getimage.png

View solution in original post

2 REPLIES 2
ttokoro
20-Turquoise
(To:DS_10024912)

You need a range to vector magic,image.png
after the definition of range Wt 

image.png

Then, you getimage.png

Yes, distinguishing between ranges and vectors is a constant stumbling block in Mathcad and Prime. The scope of using ranges is limited.

See the link below for a slightly more detailed explanation - including how to convert a range to a vector, as ttokoro also showed.

https://community.ptc.com/t5/Mathcad/Redefining-function-result-as-a-vector/m-p/872933/highlight/true#M206526

Top Tags