Any matlab codes for UAV trajectory generation for randomly distributed moving ground users, using any reference datasets
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello Mathwork Community,
I need a help to draw the trajectory of UAV based on the ground users mobility in cognitive Radio network in matlab. I need any reference/source codes that can be used to draw the trajectory of UAV based on the ground users mobility. I will be thankful if someone shares the informations or data in this regards.
Kind Regards!
댓글 수: 0
답변 (4개)
Walter Roberson
2022년 6월 3일
I suggest that you use animatedline() to draw the trajectory.
If you create a scatter() of the user locations and you record the handle returned by scatter(), then you can update the XData and YData properties of the handle in order to move the users efficiently.
Your question does not include any information about how to decide where to move the UAV
댓글 수: 0
Khalid Khan
2022년 6월 3일
댓글 수: 1
Walter Roberson
2022년 6월 3일
That is code to move the users, but does not appear to have anything for the UAV.
Walter Roberson
2022년 6월 3일
ux = randi(100);
uy = randi(100);
L = animatedline(ux, uy);
xlim([0 100])
ylim([0 100])
for K = 1 : 100
ux = ux + randi([-15 15]);
uy = uy + randi([-15 15]);
addpoints(L, ux, uy);
drawnow;
end
... using animatedline just like I said originally
댓글 수: 1
Walter Roberson
2022년 6월 3일
See also https://www.mathworks.com/matlabcentral/answers/1732510-during-the-moving-random-points-i-don-t-see-animation-instead-i-see-re-scattering#comment_2196170
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!