Hi Guys,
I created a MEX wrapper that uses C++ to cast a PrescribedController from a controllerSet using dynamic_cast:
PrescribedController* controller = dynamic_cast<PrescribedController*>( &controllerSet.get(0) );
I was wondering if it is also possible to access the controllerSet's PrescribedController Properties solely in Matlab?
Regards,
Lars
Casting controllersets in Matlab
- Lars Boers
- Posts: 14
- Joined: Thu Sep 06, 2018 2:23 am
- Thomas Uchida
- Posts: 1793
- Joined: Wed May 16, 2012 11:40 am
Re: Casting controllersets in Matlab
You can try the safeDownCast() method (there's a Matlab example on the "Common Scripting Commands" page in the Confluence documentation; search this page for "safeDownCast": https://simtk-confluence.stanford.edu:8 ... g+Commands).
- Lars Boers
- Posts: 14
- Joined: Thu Sep 06, 2018 2:23 am
Re: Casting controllersets in Matlab
Hi Thomas,
Thanks for the reply, works perfectly!
Regards,
Lars
Thanks for the reply, works perfectly!
Regards,
Lars