function est=estnorm(A,p,iter); % ESTNORM estnorm(A,p,iter) % returns estimate of norm of square matrix A % for 1 < p < infty % using iter normally distributed random input vectors format long, format compact % save space, show digits est=0.0; for j=1:iter x=randn(size(A,1),1); % note n=size(A,1)=size(A,2) new=norm(A*x,p)/norm(x,p); if new>est, est=new; disp(est), end end