Fixed fade_in.m
Fixed the error where the dimensions don't agree for the operation input .* multiplier
This commit is contained in:
parent
615e94b612
commit
ecf6ec01ea
@ -21,7 +21,10 @@ function output = fade_in(input, time)
|
|||||||
% set multiplier as 1D array
|
% set multiplier as 1D array
|
||||||
% 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
|
||||||
|
Reference in New Issue
Block a user