The (x,y) coordinates of a certain object as a function of time t are given by x(t) = 5t - 10; and y(t) = 25t2 – 120 t + 144, for 0 ≤ t ≤ 4. 1)
71 次查看(过去 30 天)
显示 更早的评论
- determine the time at which the object is the closest to the origin at (0,0);
- determine the minimum distance
solution:
for t=0:0.1:4
x=5*t-10;
y=25*t^2-120*t+144;
dist=sqrt(y^2+x^2);
end
need help determine the time at which the object is the closest to the origin at (0,0); and determine the minimum distance
solution:
0 个评论
采纳的回答
Torsten
2022-9-28
编辑:Torsten
2022-9-28
syms t
x = 5*t-10;
y = 25*t^2-120*t+144;
distance_squared = x^2+y^2;
d_distance_squared_dt = diff(distance_squared,t);
time_of_minimum_distance = vpa(solve(d_distance_squared_dt==0,'MaxDegree',3));
time_of_minimum_distance = time_of_minimum_distance(abs(imag(time_of_minimum_distance))<1e-3)
minimum_distance = sqrt(subs(distance_squared,time_of_minimum_distance))
tnum = 0:0.001:4;
xnum = @(t)5*t-10;
ynum = @(t)25*t.^2-120*t+144;
hold on
plot(xnum(tnum),ynum(tnum))
plot(xnum(double(time_of_minimum_distance)),ynum(double(time_of_minimum_distance)),'o')
hold off
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!