comparison util/SL_A.m @ 1:7750624e0c73 version0.5

(none)
author idamnjanovic
date Thu, 05 Nov 2009 16:36:01 +0000
parents
children 33850553b702
comparison
equal deleted inserted replaced
0:5181bee80bc1 1:7750624e0c73
1 function y = SL_A(mode, m, n, x, I, dim)
2 % Ivan Damnjanovic 2009
3 % This is auxilary function to allow implicit matrices from SPARCO
4 % to be used with SparsLab solvers
5
6 global SMALL
7 if (mode == 1)
8
9 u = zeros(dim, 1);
10 u(I) = x;
11 y = SMALL.Problem.A(u,1);
12
13 elseif (mode == 2)
14
15 x2 = SMALL.Problem.A(x,2);
16 y = x2(I);
17
18 end
19
20 end