Mercurial > hg > ddm
view lin_solve_dgr_2.m @ 4:72c011ed1977 tip
more elaborate example with non-stat. estimate explanation
author | smusevic |
---|---|
date | Tue, 30 Jul 2013 09:56:27 +0100 |
parents | a4a7e3405062 |
children |
line wrap: on
line source
% solve multiple 2nd degree linear systems at once - no pivoting! function dg2 = lin_solve_dgr_2(A,b,R) nrm = (-A(2,1,:) .* A(1,2,:) + A(1,1,:) .* A(2,2,:)); dg2 = zeros(2,R); dg2(1,:) = -(b(2,1,:) .* A(1,2,:) - b(1,1,:) .* A(2,2,:)) ./ nrm; dg2(2,:) = -(b(1,1,:) .* A(2,1,:) - b(2,1,:) .* A(1,1,:)) ./ nrm; end