A pressure sensor produces a reading of 6.8 V. Its calibration offset is 0.8 V and its scale is 0.4 V/kPa. The pressure calculation should subtract the offset from the reading before dividing by the scale:
You enter the following commands in the MATLAB Command Window:
reading = 6.8; offset = 0.8; scale = 0.4; pressure = reading - offset/scale;
Find the raw number stored in pressure by these commands and the pressure obtained after correcting the grouping. Report the raw stored number to one decimal place and the corrected pressure in kPa to one decimal place. MATLAB does not attach physical units to these numeric variables.
Unlock full course notes by signing up
Match commands to their effects
A MATLAB workspace initially contains exactly three scalar double variables: trial = 4, total = 10, and ans = 2. Match each command sequence to its resulting workspace state and displayed output. Run each sequence independently from this initial state. Semicolons suppress assignment output.
Trace names and stored values
A student records force readings in newtons and enters the following MATLAB commands in order. The initial clear removes all previously stored variables.
Complete the table at each indicated checkpoint. Enter exact integers for stored values, all in newtons, or the word absent if the variable does not exist. Treat load_N and Load_N as distinct names.
Check proposed sensor variable names
A laboratory team proposes six names for variables in MATLAB. Classify each name by entering valid or invalid in the table. Judge whether MATLAB permits the name, even when using it might interfere with an existing function. All names are short enough to satisfy MATLAB's name-length limit.
Recover an input from a preserved result
An engineering student calculates stress as force divided by area, using newtons, square metres, and pascals. The student enters these MATLAB commands in order:
Which statements correctly describe the final workspace or a proposed recovery calculation? Select every correct statement, evaluating each proposed recovery independently from this final state.