compute sign(detA) from data in p
0001 function muv=sgndetA(p,neig) 0002 % compute sign(detA) from data in p 0003 r=resi(p,p.u,p.lam); Gu=getGu(p,p.u,p.lam,r); Glam=getGlam(p,p.u,p.lam,r); 0004 amat=[[Gu Glam]; [p.xi*p.tau(1:p.neq*p.np)' (1-p.xi)*p.tau(p.neq*p.np+1)]]; 0005 if p.eigsstart==1; vs=size(amat,1); p.evopts.v0=ones(vs,1)/vs; end 0006 [~,mu]=eigs(amat,neig,0,p.evopts); muv=mu*ones(1,neig)'; 0007 sda=sign(prod(real(muv))); fprintf(' detAold=%i, detAnew=%i\n',p.deta,sda); 0008 end