assume(P, {'real', 'positive'})
assume(b, {'real', 'positive'})
assume(mu, {'real', 'positive'})
assume(k, {'real', 'positive'})
assume(a, {'real', 'positive'})
eq1 = P - a*u^2/v - mu*u == 0;
sol = solve(eqn, [u, v]);
usol = simplify(sol.u, 'steps', 100)
usol =

vsol = simplify(sol.v, 'steps', 100)
vsol =

asol = solve(P*b - a*k == 0, a)
asol =

param = struct2array(value);
acrit = double(subs(asol, [P b mu k a], param))
ucrit = double(subs(usol, [P b mu k a], param))
vcrit = double(subs(vsol, [P b mu k a], param))
options = odeset('RelTol', 1e-4, 'AbsTol', 1e-6);
[t, x] = ode45(@(t, x) ode(t, x, param), tspan, x0, options);
plot(t, x), grid on, legend('activator, u', 'inhibitor, v'), xlabel('t')
title('Responses in Gierer-Meinhardt activator-inhibitor')
x(end,:)
ans =
0.0373 0.0013
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
function dx = ode(t, x, param)
dx(1,1) = P - a*u^2/v - mu*u;