clc
clear
disp"ck"

t = 0:0.1:10;

XA = 0.6 * t;
XB = 0.05 * (t.^2) + 0.1 * t + 0.5;

xlabel('time(sec)');
ylabel('position(m)');
plot(t, XA, 'b-'); hold on;
plot(t, XB, 'r--');

title('3rd lab assignment by courtni k')
a = 0.05; b = -0.5; c = 0.5;
t_intersect1 = (-b - sqrt(b^2 - 4*a*c)) / (2*a)
t_intersect2 = (-b + sqrt(b^2 - 4*a*c)) / (2*a)

x_intersect1 = 0.6 * t_intersect1
x_intersect2 = 0.6 * t_intersect2

plot(t_intersect1, x_intersect1, 'ko', 'MarkerFaceColor', 'g')
plot(t_intersect2, x_intersect2, 'ko', 'MarkerFaceColor', 'g')

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: