Skip to main content
1-Visitor
December 7, 2020
Solved

Value must be a vector error in force analysis

  • December 7, 2020
  • 1 reply
  • 1249 views

I am incorporating mass as a defined variable a mechanism force analysis and I keep getting an error that the value needs to be a vector. The file is below. What can I do to fix this issue?

Best answer by terryhendicott

Hi,

The first error is confusing vector element addressing with subscripted name tags.

 

Vector element addressing uses the "[" square bracket.   Eg A[1 is the second alement of A vector.  A[0 is the first by default.  You can change the zero base.

 

Subscripted name tags for variables use the "." dot symbol.  A.1  is a subscripted variable name.  A.0 is a different subscripted variable name.  You can use subscripted variable names for vectors.

 

The second mistake is you have used the equality binary operator bold= entered as CTRL = for the definition of functions.  You should use the assignment equals entered with the colon button ":"

 

Cheers

Terry

 

1 reply

21-Topaz II
December 8, 2020

Hi,

The first error is confusing vector element addressing with subscripted name tags.

 

Vector element addressing uses the "[" square bracket.   Eg A[1 is the second alement of A vector.  A[0 is the first by default.  You can change the zero base.

 

Subscripted name tags for variables use the "." dot symbol.  A.1  is a subscripted variable name.  A.0 is a different subscripted variable name.  You can use subscripted variable names for vectors.

 

The second mistake is you have used the equality binary operator bold= entered as CTRL = for the definition of functions.  You should use the assignment equals entered with the colon button ":"

 

Cheers

Terry