Preserve a session before a fresh run

Your MATLAB workspace contains unsaved experimental arrays and outdated values of gain_N_per_V and voltage_V. Create a checkpoint, a saved copy of the starting workspace, before preparing a fresh calculation.


The current folder contains inputs.mat, which stores exactly gain_N_per_V and voltage_V, and the saved script process_run.m. The script contains only:


MATLAB
force_N = gain_N_per_V * voltage_V;


The gain is a scalar in N/V, and the voltage array contains readings in volts. All workspace variables are ordinary numeric arrays. The files checkpoint.mat and results.mat do not yet exist, and all commands will complete successfully when correctly ordered.


Arrange the commands so that you preserve the entire starting workspace, run the script with only freshly loaded input variables present at its start, and save the newly calculated force array. Use each command exactly once.

Loading ordering steps…

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 Using Script Files and Managing Data Questions: