PRBS input to an ODE system

조회 수: 8 (최근 30일)
Giacomo Filippini
Giacomo Filippini 2018년 1월 5일
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