fixed fade_in.m
changed it so that it accepts instances of time where t < 1 and not a whole number
This commit is contained in:
parent
9c10481b9b
commit
23fb666a57
@ -12,10 +12,21 @@ function output = fade_in(input, time)
|
||||
|
||||
len = length(input);
|
||||
|
||||
% need to use whole number for time
|
||||
time = round(time);
|
||||
|
||||
% if time parameter longer than signal, treat time as
|
||||
% the duration of original signal
|
||||
if time > len
|
||||
time = len
|
||||
time = len;
|
||||
end
|
||||
|
||||
% in order to create array, time >=1
|
||||
% if not, it's arbitrarily set to 1
|
||||
% in which case the fade_in effect
|
||||
% is virtually nonexistent
|
||||
if time < 1
|
||||
time = 1;
|
||||
end
|
||||
|
||||
% set multiplier as 1D array
|
||||
|
Reference in New Issue
Block a user