フィルターのクリア

Tracking a moving target trajectory

6 ビュー (過去 30 日間)
Ameer Hamza
Ameer Hamza 2018 年 5 月 8 日
コメント済み: Akshay A 2020 年 3 月 9 日
Hello, I have problem in matlab. I am trying to simulate code of tracking a moving target trajectory (3D). The target will move first than the others point will follow same target. I need to know how to write this code. Thank you.

回答 (2 件)

KSSV
KSSV 2018 年 5 月 8 日
a = 0.1 ;
b = 0.2 ;
N = 10 ;
x = (b-a).*rand(N,1) + a;
y = (b-a).*rand(N,1) + a;
mx = mean(x) ; my = mean(y) ; % main point/ target
plot(x,y,'.r') ;
hold on
plot(mx,my,'*b') ;
% path
tx = linspace(0,2*pi,100) ;
ty = sin(tx) ;
for i = 1:100
xi = x+tx(i) ; yi = y+ty(i) ;
mxi = mx+tx(i) ; myi = my+ty(i) ;
plot(xi,yi,'.r') ;
hold on
plot(mxi,myi,'*b') ;
plot(tx,ty,'b') ;
axis([min(tx) max(tx) min(ty) max(ty)])
drawnow
pause(0.1)
hold off
end

Image Analyst
Image Analyst 2018 年 5 月 8 日
See attached demo code I wrote for a projectile. It computes just about everything you could possibly want to know about the projectile. Change input parameters to what yours are.
  2 件のコメント
Robert Jack
Robert Jack 2019 年 11 月 20 日
Very nice program!
Was helpful when building a useful base to the code i added for a more sophisticated model.
Cheers!
Akshay A
Akshay A 2020 年 3 月 9 日
can you provide that code?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by