Updates to App

Soundgenerator Selector Added
This commit is contained in:
Darell Chua Yun Da 2021-12-05 15:58:24 +08:00
parent e7fdfda8e3
commit ab55430fae
2 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,13 @@
function output = SoundGeneratorSelect(amplitude, frequency, phase, fs, duration, duty,number)
if(number == "Option 1")
output = generate_sine(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 2")
output = generate_square(amplitude, frequency, phase, fs, duration, duty);
elseif(number == "Option 3")
output = generate_triangle(amplitude, frequency, phase, fs, duration, duty);
else
output = 0;
end
end