Iam forming system of 3 ODE's(dy1/dt, dy2/dt, dy3/dt) using matrices A, B and V.
A and B matrices(both 3*3) are interms of some variable teta.
I want to substitute y3 in place of teta and proceed solving ODE's.
My ODE is inv(B).*(V-(A*Y)), where V = column matrix of order 3.
i tried like this
odefun = @(t,Y) inv(B).*(V-(A*Y));
[t, Y] = ode45(odefun, tspan, Y0);
But iam getting this error
Unrecognized function or variable 'Y'.
Error in Untitled5 (line 43)
A = subs(Ai, teta, Y(3))
Facing issue in substituting Y3, how to resolve that?