Repair a sample alignment error

In modern MATLAB with implicit expansion, three travel distances are stored as the row vector d = [6 12 20] in metres. Their corresponding travel times are stored as the column vector t = [2; 3; 4] in seconds. A student evaluates v = d ./ t to calculate one average speed per trip.


Which diagnosis and correction preserve the intended pairing?

Choose an answer

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 Vectorized Code and Logical Operations Questions: