Property 'upper_leg_length' is not recognized as valid

17 次查看(过去 30 天)
I have set a parameter for simulink matlab function ,when i run simulink it shows:
Property 'upper_leg_length' is not recognized as valid. Function 'forward_kinematics.m' (#154.69.90), line 2, column 8: "body.upper_leg_length"
i set body.upper_length=2.000
and here is my simulink matlab function :
function end_e = forward(hr, hp, kp, body)
ul=body.upper_leg_length;
ll=body.lower_leg_length;
end_e = [-ll*sin(kp+hp)-ul*sin(hp);
sin(hr)*(ll*cos(kp+hp)+ ul*cos(hp));
-cos(hr)*(ll*cos(kp+hp))+ ul*cos(hp)];
end
  1 个评论
Geoff Hayes
Geoff Hayes 2020-5-16
Xinyi - you mention that you set body.upper_length=2.000. How is this related to the upper_leg_length? Are you assuming that the upper_leg_length should be automatically created? Or are these two variables the same and that your forward function should be
ul=body.upper_length;
instead? I don't know use Simulink so have not idea of what should be happening.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by