programming part done

This commit is contained in:
2015-11-06 22:20:06 +01:00
parent 573bb58ac9
commit cc1ce11fe9
2 changed files with 152 additions and 111 deletions

View File

@@ -0,0 +1,17 @@
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 = i:length(frequencies)
[x_data, y_data] = calculate_sinewave(frequencies(j), ...
amplitudes(i), t_max, t_step);
plot_sinewave(x_data, y_data, sprintf('freq: %5.2f, ampl: %5.2f',...
frequencies(j), amplitudes(i)))
end
end
legend('show')