%% calculations
c = 340;    %speed of sound
l = 1;      %loudspeaker array w/ length of 1 m
d = 10;     %listening point at distance of 10 m

disp('conditions for "far field":');
disp('1. d >> l');
disp('2. d/l >> l/wavelength');
disp('3. d >> wavelength');

disp(sprintf('\ngiven l = %i, d = %i',l,d));
disp(sprintf('%i >> %i, condition met',d,l));
wavelength = l^2/d;
disp(sprintf('%i >> 1/wavelength, valid for wavelength > %2.2f',d/l,wavelength));
f2 = c/wavelength;
disp(sprintf('therefore, f2 = c/wavelength = %2.2f',f2));
f1 = c/d;
disp(sprintf('since if d is to be >> wavelength, and d is fixed, wavelength can increase to a maximum of %2.2f, so f1 must = c/d = %2.2f',d,f1));
disp(sprintf('frequency range of operation of the array is approximately:\n   %2.2f Hz < f < %2.2f Hz',f1,f2));