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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Value must be a vector error in force analysis

RM_9744827
5-Regular Member

Value must be a vector error in force analysis

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?

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

1 REPLY 1

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

 

Announcements

Top Tags