Fixed fade_in.m

Fixed the error where the dimensions don't agree for the operation input .* multiplier
This commit is contained in:
SeaSponge 2021-12-09 18:56:59 -08:00 committed by GitHub
parent 615e94b612
commit ecf6ec01ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,9 @@ function output = fade_in(input, time)
% fade in effect: from no volume to full volume of signal % fade in effect: from no volume to full volume of signal
multiplier = (1 : time) / time; multiplier = (1 : time) / time;
while length(multiplier) < len
multiplier = [multiplier 1];
end
% the resulting fade-in output % the resulting fade-in output
output = input .* multiplier; output = input .* multiplier;
end end