function fcvec = freqgen(fl,fh,fcent,finc)
% freqgen(fl,fh,fcent,finc) calculates the characteristic
% frequency to be used for a display.  The frequencies 
% produced are related by fcvec(n+1) = fcvec(n)*10^finc.
% Frequencies are produced that lie between fl and fh,
% including fc exactly.

finc10 = 10^finc;
f = fcent;
fcvec = fcent;
imax = 1;
jmax = 1;

for i = 1:100,
	f = f*finc10;
	if(f > fh) 
		break;
		end
	freqhi(i) = f;
	imax = i;
	end

if(imax > 0)
	fcvec = [fcvec freqhi(1,1:imax)];
	end
	
f = fcent;
for j = 1:100,
	f = f/finc10;
	if(f < fl) 
		break;
		end
	freqlo(j) = f;
	jmax = j;
	end

if(jmax > 0) 
	fcvec = [freqlo(1,jmax:-1:1) fcvec];
	end
	
