clear
format short g

N = 100;
x = linspace(-pi, pi, N)';  

sf = [0.1, 0.5, 2];          
N_sf = numel(sf);           

sin_array = zeros(N, N_sf);  

for ndx = 1:N_sf
    sin_array(:, ndx) = sin_scale(x, sf(ndx));
end

figure(3);
plot(x, sin_array);
title(['A Sine Function with Scaling Factors = ', num2str(sf)]);
xlabel('x');
ylabel('sin(x / sf)');
legend(arrayfun(@(s) ['sf = ', num2str(s)], sf, 'UniformOutput', false));
