Use the example's time, height, and battery columns.
Procedure
Create three column vectors and combine them into a 5×3 array.
Use size to check the dimensions, and extract the third row and the height column separately.
Results to retain
Row/column selection results and a measurement table with units.
Items to record and points to check
Selection method
Array size
Meaning of values
Points to check
Did you place the three values at each time in the same row?
Have you distinguished index 3 from time 3 seconds?
2. Select by height condition and time interval
Starting conditions
Select height≥.5 m and 1≤t≤3 seconds separately.
Procedure
Create two logical arrays and check which rows are selected.
Select records that satisfy both conditions, and record time, height, and battery together.
Change the height condition to .8 m and check which rows are excluded.
Results to retain
Selection results for each condition and selected points marked on a height plot.
Items to record and points to check
Condition
Selected times [s]
Height [m]
Battery [%]
Points to check
Have you avoided incorrectly mixing separate height and time criteria?
Are column meanings preserved when conditions change?
3. Handle empty selection results
Starting conditions
No records satisfy height≥2 m.
Procedure
Select rows with height at least m, and record the results of size and isempty. If no heights are selected, branch to display 'No results' instead of the maximum.
Before running the selection code, append one value to each column vector t, height_m, and battery_pct, then rerun measurements=[t,height_m,battery_pct]. The new elements of all three vectors must form the same measurement row. Set the added row's height to at least m and record the three values.
Rerun the same selection code and record the selected row count, displayed result, and maximum selected height before and after the addition, side by side.
Results to retain
Empty results and results after adding a new measurement.
Items to record and points to check
Condition
Number of rows
Subsequent calculation/display
Points to check
Have you avoided replacing an empty array with an actual height of 0?
Can the added row be included without manually changing the number 5 in the code?