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 天)
  1. determine the time at which the object is the closest to the origin at (0,0);
  2. 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:

采纳的回答

Torsten
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)
time_of_minimum_distance = 
2.2329755303037266971416759922807
minimum_distance = sqrt(subs(distance_squared,time_of_minimum_distance))
minimum_distance = 
1.3576993861022464728780306330975
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 CenterFile Exchange 中查找有关 Numbers and Precision 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by