Before the commands below run, climate.mat contains exactly two variables: temperature_C = [18 20 22] in degrees Celsius and time_s = [0 5 10] in seconds. The workspace contains temperature_C = [24 26 28] and has no variable named time_s. The name S is unused.
save("climate.mat","temperature_C") S = load("climate.mat");
Both commands succeed. Which statements about the result or the proposed change are correct? Select all that apply.
Loading climate.mat again can restore the original time_s array into the workspace.
The file retains [0 5 10] as time_s because that variable was omitted from the save.
S.temperature_C contains [24 26 28], and S has no field named time_s.
Adding "-append" to the original save command would preserve the stored time_s array.
Unlock full course notes by signing up
Calculate from the saved calibration
A current sensor uses a calibration factor in amperes per volt. The following commands execute successfully in order. The function mean computes the arithmetic mean of the readings.
What value does current_A contain? Give your answer in amperes, to one decimal place.
Trace memory and disk separately
A mechanics experiment records a mass in kilograms and a force in newtons. Initially, rig.mat does not exist. All commands below execute successfully in the same workspace and folder.
Complete the table at each checkpoint. Enter exact integers without units, or the word absent when the named variable is not stored in the indicated location.
Budget memory for selected arrays
Before importing an experiment's data, you inspect sensor_run.mat, a MAT-file. The saved arrays have the following properties.
All arrays are full, real arrays. Each double element occupies 8 bytes. For this estimate, numeric payload means storage occupied by array elements alone; ignore array headers and temporary copies.
The compressed file occupies 160000 bytes on disk. Your import has a numeric-payload budget of 500000 bytes. You will load only voltage_V and time_s.
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:
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.