This repository has been archived on 2023-12-21. You can view files and clone it, but cannot push or open issues or pull requests.
ece45-project/src/SoundGeneratorSelect.m

14 lines
487 B
Mathematica
Raw Normal View History

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