Before execution, write down A's sums and means by axis and the shapes of A*A and A@B.
Calculate using NumPy and check the (0,1) element of A@B by hand.
Record the result array and shape for each axis and operation in a table.
Results to retain
A table with at least 6 rows, including axis aggregation and the two kinds of multiplication.
Items to record and points to check
Operations
Expected shape
Actual shape
Value and meaning
Points to check
Do the inner dimensions match for matrix multiplication?
Did you check (A@B)[0,1] rather than the meaning of A@B[0,1]?
2. Time series axes and units
Starting conditions
Use s and V.
Procedure
Check the number of elements in the voltage and time arrays, and draw a line plot.
Use np.diff(V)/np.diff(t) to calculate interval slopes and plot them at interval midpoints.
Calculate the first interval's slope by hand and compare with the code.
Results to retain
Voltage and slope plots, and a 4-row table.
Items to record and points to check
Interval [s]
ΔV [V]
Δt [s]
Slope [V/s]
Points to check
Did you handle the difference in length between sample values and interval values?
Did you label the axes with units as well as numbers?
3. Noise and smoothing
Starting conditions
With seed=7, create 101 points over s and add noise with a standard deviation of .2 to .
Procedure
Apply np.convolve(...,mode="same") to the same noisy signal using uniform kernels of lengths 3 and 9.
Plot the original signal, noisy signal, and two filter outputs on the same time axis. Calculate both RMSE values from the difference between the original signal and filter output over the common interval [4:-4], excluding the four samples at each end.
Record kernel length, comparison sample count, and RMSE in two rows. Use the plots and RMSE to distinguish apparent smoothness from closeness to the original signal.
Results to retain
Plots of the original signal, noisy signal, and two filter outputs, and an RMSE table for 2 conditions.
Items to record and points to check
Window
Comparison interval
RMSE
Observed changes
Points to check
Did you use the same boundary handling and comparison interval?
Did you avoid generating new noise for each condition?