Any matlab codes for UAV trajectory generation for randomly distributed moving ground users, using any reference datasets
4 次查看(过去 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!