Page 1 of 1

Help Needed: Unrecognized Function or Variable 'getAsMat' Error

Posted: Tue Jun 04, 2024 5:00 am
by ebenezer
Hello,

I am encountering an issue with my OpenSim Moco project and would appreciate any assistance. Below are the details of the errors I am facing:

Unrecognized function or variable 'getAsMat'.
Error in osimTableToStruct (line 65)
dataArray = osimtable.getDependentColumnAtIndex(iLabel).getAsMat();
Error in osimMocoTrajectoryReport (line 134)
ref = osimTableToStruct(refTable);
Error in InverseWithEMGquali (line 131)
report = osimMocoTrajectoryReport(model, ...)

Despite my efforts, I have not been able to resolve the error. Has anyone encountered a similar issue or have suggestions on how to fix this?

Any help or insights would be greatly appreciated.

Thank you!

Re: Help Needed: Unrecognized Function or Variable 'getAsMat' Error

Posted: Tue Jun 04, 2024 10:47 am
by nbianco
Hi Ebenezer,

If OpenSim is installed correctly, 'getAsMat()' should work out of the box. What version of OpenSim are you using?

Best,
Nick

Re: Help Needed: Unrecognized Function or Variable 'getAsMat' Error

Posted: Wed Jun 05, 2024 12:00 pm
by ebenezer
Hello Nick,

I am using version 4.5

Re: Help Needed: Unrecognized Function or Variable 'getAsMat' Error

Posted: Thu Jun 06, 2024 9:15 am
by nbianco
Hi Ebenezer,

To help debug, could you go inside the 'osimTableToStruct' script and see what variable type "osimtable.getDependentColumnAtIndex(iLabel)" returns?

Best,
Nick