a lot of tiny changes and fixes

This commit is contained in:
2018-10-18 13:41:16 +02:00
parent 8ebf497880
commit c2dfa9ab47
4 changed files with 113 additions and 105 deletions

View File

@@ -1,5 +1,7 @@
function sines = calculateSines(x, amplitudes, frequencies)
% Function calculates sinewaves with all combinations of
% sines = calculateSines(x, amplitudes, frequencies)
%
% Function calculates sinewaves with all combinations of
% given amplitudes and frequencies.
% Arguments: x, a vector of radiants for which the sine should be
% computed.
@@ -8,11 +10,11 @@ function sines = calculateSines(x, amplitudes, frequencies)
%
% Returns: a 3-D Matrix of sinewaves, 2nd dimension represents
% the amplitudes, 3rd the frequencies.
sines = zeros(length(x), length(amplitudes), length(frequencies));
for i = 1:length(amplitudes)
sines(:,i,:) = sinesWithFrequencies(x, amplitudes(i), frequencies);
sines(:,i,:) = sinesWithFrequencies(x, amplitudes(i), frequencies);
end
end