So I have the following code:
n = 10 ;result = zeros(n,5 );for k=1:n ;A0=1;P0=29;g=rand;p=rand;B=rand ;result(k,:) = [A0,P0,g,p,B ];end;
Which produces a 10×5 numeric array as the result.
And I'd like to use my results from there as the input values to solve this equation ten times:
tspan=[1 7];[t,x] = ode45(@(t,x) [-g*x(1) + p*x(1); -x(1)*x(2)+ B*x(2)], tspan, [A0 P0]);
Is this possible?
Thanks in advance!