Mercurial > repos > public > sbplib
view minors.m @ 774:66eb4a2bbb72 feature/grids
Remove default scaling of the system.
The scaling doens't seem to help actual solutions. One example that fails in the flexural code.
With large timesteps the solutions seems to blow up. One particular example is profilePresentation
on the tdb_presentation_figures branch with k = 0.0005
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 18 Jul 2018 15:42:52 -0700 |
parents | eaf557023fbe |
children |
line wrap: on
line source
function [minor, sub] = minors(A, verbose) default_arg('verbose', true); [n, m] = size(A); if n ~= m error('A must be square'); end sub = {}; ks = {}; ind = 1:n; for k = 1:n C = nchoosek(ind,k); for i = 1:size(C,1) ks{end + 1} = k; sub{end + 1} = A(C(i,:),C(i,:)); end end for i = 1:length(sub) if verbose fprintf('%d:\n', ks{i}); disp(sub{i}) end minor(i) = det(sub{i}); end end % A is positive semidefinite if all minors are non-negative % A is negative semidefinite if all odd minors are non-positive and all even minors are non-negative