Property 'upper_leg_length' is not recognized as valid
22 views (last 30 days)
Show older comments
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 Comment
Geoff Hayes
on 16 May 2020
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.
Answers (0)
See Also
Categories
Find more on Troubleshooting in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!