% To solve the velocity of actin cortex

function Cortex_Flat_Updated(psi)

global Invariant ini_Val Material V Constraints



Material.xi_rho_0 = Material.f1 - Material.f2 *  psi';

figure(33)
plot(Invariant.gaussp*Material.R0,Material.xi_rho_0)
xlabel('r')
ylabel('contractility')



M = matrix_Mass_Cortex;
K = matrix_Stiffness_Cortex;
F=vector_rhs_1_Cortex;
G=vector_rhs_2_Cortex;
LHS = M+K;
RHS = F+G;


RHS(end) = RHS(end) + Material.xi_rho_0(end);

L=zeros(1,length(RHS));
L(1,1)=1;
MM = [LHS, L';L zeros(1,1)];
ff = [RHS; 0];
XX = MM\ff;
V=XX(1:end-1);





