Skip to content
Snippets Groups Projects
Commit 178f62b4 authored by Rivnyák Tímea's avatar Rivnyák Tímea
Browse files

Add noise to the system

parent fb1e0028
No related branches found
No related tags found
No related merge requests found
......@@ -32,5 +32,20 @@ legend('S', 'I', 'R', 'C');
%% Add noise
noise = wgn(size(t,1), 4, 0, 42);
y_noise = y + noise;
figure(2)
plot(t, y_noise);
xlabel('Time(days)');
ylabel('Number of individuals');
legend('S', 'I', 'R', 'C');
[t_noisy, y_noisy] = ode45(@(t, y) noisy_deriv(y, nu, mu, epsilon, beta, gamma, Gamma, q), [0 time], y0);
figure(3)
plot(t_noisy, y_noisy);
xlabel('Time(days)');
ylabel('Number of individuals');
legend('S', 'I', 'R', 'C');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment