annotate util/SL_A.m @ 5:f44689e95ea4

(none)
author idamnjanovic
date Mon, 22 Mar 2010 10:43:01 +0000
parents 7750624e0c73
children 33850553b702
rev   line source
idamnjanovic@1 1 function y = SL_A(mode, m, n, x, I, dim)
idamnjanovic@1 2 % Ivan Damnjanovic 2009
idamnjanovic@1 3 % This is auxilary function to allow implicit matrices from SPARCO
idamnjanovic@1 4 % to be used with SparsLab solvers
idamnjanovic@1 5
idamnjanovic@1 6 global SMALL
idamnjanovic@1 7 if (mode == 1)
idamnjanovic@1 8
idamnjanovic@1 9 u = zeros(dim, 1);
idamnjanovic@1 10 u(I) = x;
idamnjanovic@1 11 y = SMALL.Problem.A(u,1);
idamnjanovic@1 12
idamnjanovic@1 13 elseif (mode == 2)
idamnjanovic@1 14
idamnjanovic@1 15 x2 = SMALL.Problem.A(x,2);
idamnjanovic@1 16 y = x2(I);
idamnjanovic@1 17
idamnjanovic@1 18 end
idamnjanovic@1 19
idamnjanovic@1 20 end