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 日間)
古いコメントを表示
- 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 で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!