language and code fixes

This commit is contained in:
2015-11-14 17:19:20 +01:00
parent 508b6bb5cc
commit 29c5e4d8ed
3 changed files with 86 additions and 84 deletions

View File

@@ -1,6 +1,6 @@
n = 5;
x = 1;
for i = 1:n
x = x * i;
x = x * i;
end
fprintf('Faculty of %i is: %i\n', n, x)
fprintf('Faculty of %i is: %i\n', n, x)

View File

@@ -7,7 +7,7 @@ figure()
hold on
for i = 1:length(amplitudes)
for j = i:length(frequencies)
for j = 1: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',...