gitinore *.txt files
[wrf-fire-matlab.git] / femwind / scond.m
blob602c15d303cf69cc64557888910844ab58a201e0
1 function condition=scond(K)
2 R= chol(K);
3 afun = @(v) R\(R'\v)
4 emax= eigs(K,1,'largestreal')
5 emin= 1/eigs(afun,size(K,1),1,'largestreal','IsFunctionSymmetric',true)
6 if size(K,1)<5000,
7     e = eig(full(K)); emax_direct=max(e), emin_direct=min(e)
8 end
9 condition= emax/emin;