This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/programming/code/plotMultipleSinewaves.m

18 lines
397 B
Matlab

amplitudes = 0.25:0.25:1.25;
frequencies = (2:2:10);
t_max = 10;
t_step = 0.01;
figure()
hold on
for i = 1:length(amplitudes)
for j = 1:length(frequencies)
[x_data, y_data] = sinewave(frequencies(j), ...
amplitudes(i), t_max, t_step);
plotFunction(x_data, y_data, sprintf('freq: %5.2f, ampl: %5.2f',...
frequencies(j), amplitudes(i)))
end
end
legend('show')