Page 1 of 1

measurement set

Posted: Sat Feb 17, 2018 3:47 am
by zohreh
hello every one
i am scaling a model by matlab programning
but when i want to input axis for set measurement i get this error ....
i would be very gradful if someone can help me.

m1=Measurement();
m1.setName('pelvis')
mps=m1.getMarkerPairSet();
mp=MarkerPair('LTAS','RTAS');
mps.adoptAndAppend(mp);
sm= model_Scalar.getMeasurementSet()
sm.adoptAndAppend(m)

bs1=BodyScale();
bs1.setName('pelvis');
bs1.setAxisNames('X Y Z')
No method 'setAxisNames' with matching signature found for class 'org.opensim.modeling.BodyScale'.


king regards

Re: measurement set

Posted: Sat Feb 17, 2018 2:12 pm
by tkuchida
Please see the doxygen documentation for the setAxisNames() method: https://simtk.org/api_docs/opensim/api_ ... 1e27970a96. The argument must be of type Array<std::string>. In MATLAB, you need to do something like the following:

Code: Select all

import org.opensim.modeling.*
% ...
axisNames = ArrayStr;
axisNames.append('X');
axisNames.append('Y');
axisNames.append('Z');
bs1.setAxisNames(axisNames);

Re: measurement set

Posted: Sun Feb 18, 2018 12:30 am
by zohreh
thank you .
it helps me alotof.

Re: measurement set

Posted: Tue Feb 27, 2018 8:32 am
by jackzhao123
tkuchida wrote:Please see the doxygen documentation for the setAxisNames() method: https://simtk.org/api_docs/opensim/api_ ... 1e27970a96. The argument must be of type Array<std::string>. In MATLAB, you need to do something like the following:

Code: Select all

import org.opensim.modeling.*
% ...
axisNames = ArrayStr;
axisNames.append('X');
axisNames.append('Y');
axisNames.append('Z');
bs1.setAxisNames(axisNames);
Dear Tom:
Thank you so much and it also indeed solved my problem of using Array in MATLAB ID process!

Jack