Page 1 of 1

Saving Error During Muscle Tendon Personalization Due to Muscle Name

Posted: Wed Mar 27, 2024 8:40 am
by maxdiaz
Posting an error associated with muscle naming conventions due to MatLab variable name rules.

This error occurs during MTP when the optimized parameters are being saved. From my limited understanding of MatLab it appears that the names of a field within a structure are not allowed to start with a number, so any muscle name that begins with a number that is being optimized would throw this 'Invalid field name:'. Solved it by simply changing muscle names such as 1stDI to FirstDI within the Osim file, so that all names where MatLab compliant. Of note MTP does run with muscles names that start with numbers, it just won't save them.
MTPRuns.PNG
MTPRuns.PNG (22.28 KiB) Viewed 1197 times

Re: Saving Error During Muscle Tendon Personalization Due to Muscle Name

Posted: Fri Mar 29, 2024 8:58 am
by kpariser
Thank you for sharing this. We will be sure to update our documentation to state that muscle names in the model cannot begin with a number. As you suggested this is a byproduct of our code being written in Matlab since Matlab doesn't like field or variable names starting with a number.