Selecting appropriate values for the parameters in the Gierer-Meinhardt activator-inhibitor model
For the following activator-inhibitor system (Alfred Gierer-Hans Meinhardt model),
with all constants positive and initial conditions , examine the effect of the parameters () on the behavior of concentrations . Initially, we have to consider .
My problem is that I don’t undestand how to choose the right parameters every time. For example but the code works and for or but when I chose you can see below, the results are not correct.
Could anyone explain please? Thanks in advance
Parameter k : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
ks = [0.01, 0.1, 1];
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(1);
hold on
%% Loop through each k value
for k = ks
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current k value
plot(t, u, ‘DisplayName’, [‘u(t), k = ‘, num2str(k)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), k = ‘, num2str(k)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different k Values’);
legend(‘show’);
grid on;
hold off;
Parameter : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
k = 1; % Decay rate of v (fixed in this scenario)
mus = [0.01, 0.1, 9]; % Different decay rates of u to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(2);
hold on
%% Loop through each mu value
for mu = mus
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current mu value
plot(t, u, ‘DisplayName’, [‘u(t), mu = ‘, num2str(mu)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), mu = ‘, num2str(mu)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different mu Values’);
legend(‘show’);
grid on;
hold off;
Parameter b : Range: 0.01 to 10
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v
bs = [0.1, 1, 9.9]; % Different rates for b to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(3);
hold on
%% Loop through each b value
for b = bs
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current b value
plot(t, u, ‘DisplayName’, [‘u(t), b = ‘, num2str(b)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), b = ‘, num2str(b)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different b Values’);
legend(‘show’);
grid on;
hold off;
Parameter a : Range: 0.1 to 10
% Define common parameters
P = 0.75; % Production rate of u
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v (constant in this scenario)
as = [0.1, 1, 9.9]; % Different rates of a to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(4);
hold on
%% Loop through each a value
for a = as
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current a value
plot(t, u, ‘DisplayName’, [‘u(t), a = ‘, num2str(a)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), a = ‘, num2str(a)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different a Values’);
legend(‘show’);
grid on;
hold off;For the following activator-inhibitor system (Alfred Gierer-Hans Meinhardt model),
with all constants positive and initial conditions , examine the effect of the parameters () on the behavior of concentrations . Initially, we have to consider .
My problem is that I don’t undestand how to choose the right parameters every time. For example but the code works and for or but when I chose you can see below, the results are not correct.
Could anyone explain please? Thanks in advance
Parameter k : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
ks = [0.01, 0.1, 1];
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(1);
hold on
%% Loop through each k value
for k = ks
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current k value
plot(t, u, ‘DisplayName’, [‘u(t), k = ‘, num2str(k)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), k = ‘, num2str(k)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different k Values’);
legend(‘show’);
grid on;
hold off;
Parameter : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
k = 1; % Decay rate of v (fixed in this scenario)
mus = [0.01, 0.1, 9]; % Different decay rates of u to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(2);
hold on
%% Loop through each mu value
for mu = mus
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current mu value
plot(t, u, ‘DisplayName’, [‘u(t), mu = ‘, num2str(mu)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), mu = ‘, num2str(mu)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different mu Values’);
legend(‘show’);
grid on;
hold off;
Parameter b : Range: 0.01 to 10
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v
bs = [0.1, 1, 9.9]; % Different rates for b to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(3);
hold on
%% Loop through each b value
for b = bs
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current b value
plot(t, u, ‘DisplayName’, [‘u(t), b = ‘, num2str(b)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), b = ‘, num2str(b)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different b Values’);
legend(‘show’);
grid on;
hold off;
Parameter a : Range: 0.1 to 10
% Define common parameters
P = 0.75; % Production rate of u
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v (constant in this scenario)
as = [0.1, 1, 9.9]; % Different rates of a to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(4);
hold on
%% Loop through each a value
for a = as
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current a value
plot(t, u, ‘DisplayName’, [‘u(t), a = ‘, num2str(a)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), a = ‘, num2str(a)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different a Values’);
legend(‘show’);
grid on;
hold off; For the following activator-inhibitor system (Alfred Gierer-Hans Meinhardt model),
with all constants positive and initial conditions , examine the effect of the parameters () on the behavior of concentrations . Initially, we have to consider .
My problem is that I don’t undestand how to choose the right parameters every time. For example but the code works and for or but when I chose you can see below, the results are not correct.
Could anyone explain please? Thanks in advance
Parameter k : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
ks = [0.01, 0.1, 1];
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(1);
hold on
%% Loop through each k value
for k = ks
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current k value
plot(t, u, ‘DisplayName’, [‘u(t), k = ‘, num2str(k)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), k = ‘, num2str(k)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different k Values’);
legend(‘show’);
grid on;
hold off;
Parameter : Range: 0.01 to 1
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
b = 0.9; % Production rate of v stimulated by u
k = 1; % Decay rate of v (fixed in this scenario)
mus = [0.01, 0.1, 9]; % Different decay rates of u to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(2);
hold on
%% Loop through each mu value
for mu = mus
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current mu value
plot(t, u, ‘DisplayName’, [‘u(t), mu = ‘, num2str(mu)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), mu = ‘, num2str(mu)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different mu Values’);
legend(‘show’);
grid on;
hold off;
Parameter b : Range: 0.01 to 10
% Define common parameters
P = 0.75; % Production rate of u
a = 1; % Rate of u inhibition by v
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v
bs = [0.1, 1, 9.9]; % Different rates for b to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(3);
hold on
%% Loop through each b value
for b = bs
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current b value
plot(t, u, ‘DisplayName’, [‘u(t), b = ‘, num2str(b)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), b = ‘, num2str(b)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different b Values’);
legend(‘show’);
grid on;
hold off;
Parameter a : Range: 0.1 to 10
% Define common parameters
P = 0.75; % Production rate of u
b = 0.9; % Production rate of v stimulated by u
mu = 0.5; % Decay rate of u
k = 1; % Decay rate of v (constant in this scenario)
as = [0.1, 1, 9.9]; % Different rates of a to test
T = 10; % Total simulation time
dt = 0.01; % Time step
t = 0:dt:T; % Time vector
% Initial conditions
u0 = 1; % Initial concentration of u
v0 = 0.5; % Initial concentration of v
%% Initialize a figure
figure(4);
hold on
%% Loop through each a value
for a = as
N = length(t); % Number of time steps
% Initialize arrays for u and v
u = zeros(1, N);
v = zeros(1, N);
% Set initial conditions
u(1) = u0;
v(1) = v0;
% Simulate the system’s response
for i = 2:N
% Calculate the changes in u and v using the system equations
f1 = P – a * (u(i-1)^2 / v(i-1)) – mu * u(i-1); % Change in activator
f2 = b * u(i-1)^2 – k * v(i-1); % Change in inhibitor
% Update u and v using Euler’s method
u(i) = u(i-1) + dt * f1;
v(i) = v(i-1) + dt * f2;
end
% Plot the concentration of u and v for the current a value
plot(t, u, ‘DisplayName’, [‘u(t), a = ‘, num2str(a)]);
plot(t, v, ‘–‘, ‘DisplayName’, [‘v(t), a = ‘, num2str(a)]);
end
%% Add labels, legend, and grid to the plot
xlabel(‘Time (s)’);
ylabel(‘Concentration’);
title(‘Dynamics of u and v over Time for Different a Values’);
legend(‘show’);
grid on;
hold off; model, mathematics, differential equations, plot, plotting, homework MATLAB Answers — New Questions