An engineer enters the following statements in MATLAB to inspect a sensor calibration factor. All quantities are dimensionless.
format short gain = 65/256; gain format bank gain
Immediately after the second display of gain, the engineer creates typed_gain by manually entering exactly the decimal number shown in that display. The engineer then executes:
scaled_original = 256*gain; scaled_typed = 256*typed_gain; difference = scaled_original - scaled_typed;
Complete the table. For the two displayed numbers, retain the decimal places shown by MATLAB. For the three stored calculation results, enter exact integers.
Unlock full course notes by signing up
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.
What value remains stored in recorded_mps? Give your answer in m/s, to two decimal places.
Checking proposed measurement names
An engineering team proposes 4load, beam load, beam_load2 and end as MATLAB variable names for a measured force. Complete the naming rules using words from this bank: letter, digit, underscore, space, keyword, function. Use each selected word once.
The first character of a MATLAB variable name must belong to the character type called ________, so 4load is invalid.
After the first character, the only character type permitted besides letters and underscores is the ________, so beam_load2 is valid, whereas the space in beam load is not permitted.
Case-sensitive names and retained results
Starting with an empty MATLAB base workspace, an engineer enters these commands in order. The gains are dimensionless, and the signal and estimate are in volts.
Which statement correctly describes the gain variables and estimate_V after all commands have executed?
Refreshing dependent workspace values
An engineer uses pressure equal to force divided by area. Starting with an empty MATLAB base workspace, the engineer enters:
Both pressure_Pa and report_Pa must now reflect the updated force of 150 N while retaining the area of 0.012 square metres. Which pair of commands achieves this when executed in the order shown?