simulink based matlab coding

function dFt=Tendon_SEE(ltdot,Ft) Ft=Ft Kte=302.2; Ktl=311.40; Ftc=200; Kt=150;%635.5; Kc=0; %Kt_Ft=zeros(size(Ft)); %for i=1:length(Ft) if ((Ft>=0) && (Ft<=Ftc)) Kt_Ft=(Kte*Ft)+Ktl elseif (Ft>Ftc) Kt_Ft=Kt else Kt_Ft=Kc end %end dFt=Kt_Ft*ltdot;
end

2 Comments

function dFt=Tendon_SEE(ltdot,Ft)
Ft=Ft
Kte=302.2;
Ktl=311.40;
Ftc=200;
Kt=150;%635.5;
Kc=0;
%Kt_Ft=zeros(size(Ft));
%for i=1:length(Ft)
if ((Ft>=0) && (Ft<=Ftc))
Kt_Ft=(Kte*Ft)+Ktl
elseif (Ft>Ftc)
Kt_Ft=Kt
else
Kt_Ft=Kc
end
%end
dFt=Kt_Ft*ltdot;
end end
question is ...........it always executes the last else command Kt_Ft=Kc

Sign in to comment.

Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 30 Jun 2018

Commented:

on 30 Jun 2018

Community Treasure Hunt

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

Start Hunting!