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 日間)
Chiliveri Vinod
Chiliveri Vinod 2018 年 11 月 3 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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
Stephen23 2018 年 11 月 3 日
@Chiliveri Vinod: please show us the complete error message. This means all of the red text.

回答 (1 件)

madhan ravi
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
  4 件のコメント
Chiliveri Vinod
Chiliveri Vinod 2018 年 11 月 14 日
thank u for the answer but i want the output as (2,1) dimension ,it is getting as (1,500)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by