Access a certain value at the specific moment of the analysis during param study

Hi,

I could receive the index of the minimum value of a joint moment while a certain motion is analyzed from motion data. And this is used for parameter study.



AnyParamStudy ParamStudy = {
  Analysis = { ... };
  AnyDesVar Var = { ... };

  AnyDesMeasure Min_JntM = {
    Val = min (..Study.JntM());   
  };
  AnyDesMeasure Index_Min_JntM = {
    Val = argmin (..Study.JntM());    // the moment when JntM is the minimum
  };
};

However, I’d like to receive another analysis value, i.e., the joint angle, at Index_Min_JntM (when JntM is minimum).
And I also want to save this angle value at the moment (of minimum JntM) as an AnyDesMeasure class.

I tried to make an AnyOutputFun class of the joint angle. But I did not find the way to access the specific joint angle value at the specific moment (with Index_Min_JntM) .
How can I access the value of the joint angle with the certain index number, and output it with AnyDesMeasure?


  AnyDesMeasure JntAngle = {
    Val = ....??? ;
};

Thank you.

With regards,
Dong-Pyoung

Hi Dong-Pyoung,

It will be better if you can create a simple example which contains your concepts based on our Demo Arm 2D model.

If you can upload that then we may be able to figure out how to improve that.

Best regards,
Moonki

I attach a script file for an example.
Thank you. :slight_smile:

With Regards,
Dong-Pyoung

Hi Dong-Pyoung,

Sorry for late reply.

Attached please find the modified version of your example.

Best regards,
Moonki

Dear Moonki,
I still feel awkward to access certain data structures of AnyBody sometimes.
Thank you very much!

With regards,
Dong-Pyoung