clc
clear
% Define the initial conditions
x = 0;
y = 0;
dx = 0.01;
while y < 9.8
x = x + dx;
y = 10 * (1 - exp(-x / 4));
end
xmax = x;
x_vals = linspace(0, xmax, 500);
y_vals = 10 * (1 - exp(-x_vals / 4));
plot(x_vals, y_vals, 'b-', 'LineWidth', 1.5);
xlabel('Time (seconds)');
ylabel('Force (newtons)');
title('Force vs. Time');
grid on;
hold on;
plot(xmax, 9.8, 'ro'); % Red dot at (xmax, 9.8)
text(xmax, 9.8, sprintf(' (%.2f, 9.8)', xmax), 'VerticalAlignment', 'bottom');
hold off;
To embed this project on your website, copy the following code and paste it into your website's HTML: