Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- matrix diff(double t, matrix Y, matrix &C)
- {
- matrix dY(2);
- double mr = 1, mc = 10, l = 0.5, b = 0.5, alfa_ref = 3.14, omega_ref = 0;
- double I = mr*pow(l, 2) / 3 + mc*pow(l, 2);
- dY(0) = Y(1);
- dY(1) = (C(0)*(alfa_ref - Y(0)) + C(1)*(omega_ref - Y(1)) - b*Y(1)) / I;
- return dY;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement