How to use the first output of a matlab function as the input for the revolute joint?
4 次查看(过去 30 天)
显示 更早的评论
Hi there,
i would like to use the first output of the matlab function as the input for the revolute joint, on the model in the attached .slx file. I would like to use the 1st. input of the function for the State Targets > Specify Position Target > Priority(High) > Value, to set the initial angular value. How can i achieve that?
Thanks in advance.
0 个评论
回答(1 个)
Steve Miller
2023-2-12
Hi Nayla - the value for initial position state target needs to be a hard coded value or a MATLAB variable. It cannot be set by another block in your model. That initial value specifies the requested initial angle of that joint, but that needs to be checked against other states in the mechanism to ensure that angle can be achieved.
If you can use your MATLAB function to calculate that angle outside of the simulation and then enter that value as the target, then you have that function calculate the initial target value.
--Steve
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multibody Dynamics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!