add wave genration functions

This commit is contained in:
Arthur Lu
2021-12-01 15:17:58 -08:00
parent 13c52f8c7a
commit 2ce7e6a7a4
5 changed files with 67 additions and 0 deletions

8
src/plot_wave.m Normal file
View File

@@ -0,0 +1,8 @@
function plot_wave(waveform, fs, duration)
%PLOT_WAVE:Arthur Lu plots a waveform
x = linspace(0, duration, fs * duration);
plot(x, waveform);
xlabel("time");
ylabel("amplitude");
end