From ecf6ec01ea781b79c27b2e96260e5abd24f7f2ba Mon Sep 17 00:00:00 2001 From: SeaSponge <61109988+Squidwarder@users.noreply.github.com> Date: Thu, 9 Dec 2021 18:56:59 -0800 Subject: [PATCH] Fixed fade_in.m Fixed the error where the dimensions don't agree for the operation input .* multiplier --- src/NotWorking/fade_in.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NotWorking/fade_in.m b/src/NotWorking/fade_in.m index 22bef76..254d288 100644 --- a/src/NotWorking/fade_in.m +++ b/src/NotWorking/fade_in.m @@ -21,7 +21,10 @@ function output = fade_in(input, time) % set multiplier as 1D array % fade in effect: from no volume to full volume of signal multiplier = (1 : time) / time; - + + while length(multiplier) < len + multiplier = [multiplier 1]; + end % the resulting fade-in output output = input .* multiplier; end