State Space Function Help

I've got the state space or what I think is the state space:
I'm not sure how to make the function.'gain_phase' is a function that was given to us by the prof.
This is my code so far:
% A = [-1/r1*c1 0; 1/r1c2 -1/r2c2]
% B = [1/r1c1; 1/r1]
r1 = 100;
r2 = 5000;
c1 = 100E-6;
c2 = 100E-6;
y=[1/r1*c1 -1/r2*c2];
w = 10;
u = sin(w*t);
T = (2*pi)/w;
[t,y] = ode45(@(u,y)gain_phase(u,y),t,y);
W = logspace(-1,3,100);
loglog(W,gains);
semilogx(W.phases);
plot(y,t(:,1),'b-','LineWidth',1);

Answers (0)

This question is closed.

Asked:

on 8 Oct 2018

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!