Following a retained numeric value

Starting with an empty MATLAB base workspace, a student enters the commands below in order while checking a cart's speed. Distances are in metres, times are in seconds, and speeds are in metres per second.


MATLAB
distance_m = 28;
time_s = 8;
speed_mps = distance_m/time_s;
recorded_mps = speed_mps;
speed_mps = speed_mps + 0.6;
distance_m = 40;
clear speed_mps
clc


What value remains stored in recorded_mps? Give your answer in m/s, to two decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More The MATLAB Environment and Workspace Questions: