function [out1,out2]=variable_M(P_0,M_0,k,alpha,length)

out1=zeros(1,length+1);
out2=zeros(1,length+1);
out1(1)=P_0;
out2(1)=M_0;

for i=1:length
    out1(i+1)=out1(i)+k*(out2(i)-out1(i))*out1(i);
    out2(i+1)=out2(i)+alpha*out1(i);
end
