function rhovec = random_growth_factor(max_dim,num_mat,fignum)
% rhovec = random_growth_factor(max_dim,num_mat,fignum)



jvec = [];
rhovec = [];

if nargin < 3
	fignum = 1;
end


for j = 1:num_mat
	n = round(max_dim*abs(rand(1,1)));

	A = randn(n,n);

	rhovec = [rhovec growth_factor(A)];
	jvec = [jvec n] ;
end

figure(fignum);
plot(jvec,rhovec,'b*');



no_points = 10000;
h = max_dim/no_points;

jvec = [];
rootvec = [];

for j = 1:h:max_dim 
	jvec = [jvec j];
	rootvec = [rootvec sqrt(j)];
end

figure(fignum);
hold on
plot(jvec,rootvec,'r-');


return;