Hello everyone, I need to plot a graph according to the formulas given below. I am also sharing the image of the graph that should be. I started with the following code. I would be very happy if you could help.
reference:
k = 1 / (4 * pi * epsilon_m);
x_dep = zeros(num_steps, N);
x_diff = zeros(num_steps, N);
FDEP = 4 * pi * R^3 * epsilon0 * epsilon_m * CM * (-2 * k^2 * q^2) ./ ((abs(x_dep(i, :) - x0) + epsilon).^5);
x_dep(i+1, :) = x_dep(i, :) + (FDEP / gamma) * dt + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i, :);
x_diff(i+1, :) = x_diff(i, :) + sqrt(2 * k_B * T / gamma) * sqrt(dt) * W(i, :);
x_mean_dep = mean(x_dep, 2);
x_mean_diff = mean(x_diff, 2);
plot((0:num_steps-1) * dt, x_mean_dep * 1e6, 'b', 'LineWidth', 1.5);
plot((0:num_steps-1) * dt, x_mean_diff * 1e6, 'r--', 'LineWidth', 1.5);
ylabel('Particle Position (μm)');
title('Particle Positions with and without DEP Force');
legend('DEP Force Present', 'Only Diffusion');