Skip to content

Instantly share code, notes, and snippets.

@mariohm1311
Created September 30, 2018 17:27
Show Gist options
  • Save mariohm1311/73a07f3dc09a99b13da793eed13ce3a0 to your computer and use it in GitHub Desktop.
Save mariohm1311/73a07f3dc09a99b13da793eed13ce3a0 to your computer and use it in GitHub Desktop.
speed = [0, 1, 2, 5, 2, 2];
altitude = [100, 90, 70, 30, 20, 10];
max_speed = max(speed); % Returns
% speed == max_speed = [False, False, False, True, False, False]
% altitude(speed == max_speed) = 30
altitude_at_max_speed = altitude(speed == max_speed);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment