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
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 Center 和 File Exchange 中查找有关 Troubleshooting 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!