I am getting an error for the below eqn . I wrote coding in matlab function (user defined function in simulink),so please help with this.I have also attached my simulink model.
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
function y = fcn(h,u)
A = [0 1;-1 1];
B = [0;1];
N = 300;
y = zeros(1,500);
t = 0:25
for i = 1:N
y = (h/N)*exp(i*A*(h/N)).*B*u(t-(i*(h/N)));
1 commentaire
Stephen23
le 3 Nov 2018
@Chiliveri Vinod: please show us the complete error message. This means all of the red text.
Réponses (1)
madhan ravi
le 3 Nov 2018
Modifié(e) : madhan ravi
le 3 Nov 2018
function y = fcn(h,u)
A = [0 1;-1 1];
B = [0;1];
N = 300;
y = zeros(1,500);
t = 0:25
for i = 1:N
y(i)= (h/N)*exp(i*A*(h/N)).*B*u(t-(i*(h/N)));
end
y
end
4 commentaires
madhan ravi
le 3 Nov 2018
You left two ends at the end missing
madhan ravi
le 3 Nov 2018
Thanks Stephen edited it
Chiliveri Vinod
le 14 Nov 2018
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!