comparison util/SL_A.m @ 24:fc395272d53e

(none)
author idamnjanovic
date Tue, 27 Apr 2010 13:33:00 +0000
parents 33850553b702
children 8e660fd14774
comparison
equal deleted inserted replaced
23:636a2a3d7302 24:fc395272d53e
1 function y = SL_A(A, mode, m, n, x, I, dim) 1 function y = SL_A(A, mode, m, n, x, I, dim)
2 % Ivan Damnjanovic 2009 2 %%% Sparco to SparseLab implicit matix conversion
3 % This is auxilary function to allow implicit matrices from SPARCO 3 % Centre for Digital Music, Queen Mary, University of London.
4 % to be used with SparsLab solvers 4 % This file copyright 2009 Ivan Damnjanovic.
5 5 %
6 global SMALL 6 % This program is free software; you can redistribute it and/or
7 if (mode == 1) 7 % modify it under the terms of the GNU General Public License as
8 % published by the Free Software Foundation; either version 2 of the
9 % License, or (at your option) any later version. See the file
10 % COPYING included with this distribution for more information.
11 %
12 % This is auxilary function to allow implicit matrices from SPARCO
13 % to be used with SparsLab solvers
14
15 if (mode == 1)
8 16
9 u = zeros(dim, 1); 17 u = zeros(dim, 1);
10 u(I) = x; 18 u(I) = x;
11 y = A(u,1); 19 y = A(u,1);
12
13 elseif (mode == 2)
14 20
15 x2 = A(x,2); 21 elseif (mode == 2)
16 y = x2(I); 22
17 23 x2 = A(x,2);
18 end 24 y = x2(I);
19 25
20 end 26 end
27
28 end