annotate util/SL_A.m @ 14:a0571bf2ff54

(none)
author idamnjanovic
date Thu, 25 Mar 2010 14:02:30 +0000
parents 33850553b702
children fc395272d53e
rev   line source
idamnjanovic@8 1 function y = SL_A(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@8 11 y = A(u,1);
idamnjanovic@1 12
idamnjanovic@1 13 elseif (mode == 2)
idamnjanovic@1 14
idamnjanovic@8 15 x2 = A(x,2);
idamnjanovic@1 16 y = x2(I);
idamnjanovic@1 17
idamnjanovic@1 18 end
idamnjanovic@1 19
idamnjanovic@1 20 end