Property 'upper_leg_length' is not recognized as valid

21 visualizzazioni (ultimi 30 giorni)
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 Commento
Geoff Hayes
Geoff Hayes il 16 Mag 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Troubleshooting in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by