Info
此问题已关闭。 请重新打开它进行编辑或回答。
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.
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
Stephen23
2018-11-3
@Chiliveri Vinod: please show us the complete error message. This means all of the red text.
回答(1 个)
madhan ravi
2018-11-3
编辑:madhan ravi
2018-11-3
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
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!