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)

8 ビュー (過去 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 Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by