I'm solving a system of differential equations in pythons to find
sol = solve_ivp(conv, tspan, Z0,method='BDF') aa=sol.t bb=sol.y
then I'm finding
X=v1.dot(bb) where `v1`is a transformation matrix.
I need to find the value of second row of
Xat every integration step to execute the program as
X[:,0]=[0,0,0,0] def conv(t,Z): if (second element of 4*1 X )> .7 Zdot=A*Z+B*U sol = solve_ivp(conv, tspan, Z0,method='BDF') aa=sol.t bb=sol.y X=v1.dot(bb)
I want the if condition to be checked at every step and then the
Zdot=A*Z+B*Uto be executed.
I just know the no. of rows of X at every integration step so can't use a for loop.
how do i do it?