PRBS input to an ODE system

4 次查看(过去 30 天)
Giacomo Filippini
Hi,I've generated a PRBS for an inlet flowrate with this code:
ns = 110; %s
ts = 30; %s
F = idinput(round(ns),'prbs',[0 1],[9 11]);
FinPRBS = iddata ([],F,ts);
Now, I want to pass this input to an ODE system like this:
function dXdt = systemresponse(~,X)
global A res F
Fo1 = (X(1)-X(2))/res(1);
Fi2 = Fo1;
Fo2 = X(2)/res(2);
% The differential system is set up:
dXdt(1) = 1/A(1)*(F - Fo1);
dXdt(2) = 1/A(2)*(Fi2 - Fo2);
dXdt = dXdt';
end
How can I do this? Thank you!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by