Skip to content
Snippets Groups Projects
Commit 7d36083a authored by Ramsha Narmeen's avatar Ramsha Narmeen
Browse files

Upload New File

parent 21dad3f4
No related branches found
No related tags found
No related merge requests found
function new_positions = updateRandomWaypointModel(positions, max_position)
speed = rand(1, size(positions, 2)) * 3;
direction = rand(1, size(positions, 2)) * 2 * pi;
new_positions = positions + [speed .* cos(direction); speed .* sin(direction)];
new_positions = mod(new_positions, max_position);
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment