Can Any one help me, how to import this function in matlab?

1 次查看(过去 30 天)
Y1=@(yk),y(k-1),y(k-2),u(k),u(k-1));

采纳的回答

Adam Danz
Adam Danz 2021-11-26
This uses a vector of inputs.
f = @(x)(prod([x(1),x(2),x(3),x(5),x(3)-1])+x(4)) ./ (1 + x(2)^2 + x(3)^3);
k = 5; % demo value
y = 1:5; % demo value
u = 1:5; % demo value
y(k+1) = f([y(k), y(k-1), y(k-2), u(k), u(k-1)])
y = 1×6
1.0000 2.0000 3.0000 4.0000 5.0000 11.0227

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by