PRBS input to an ODE system
3 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!