Mercurial > hg > smallbox
diff util/SL_A.m @ 24:fc395272d53e
(none)
author | idamnjanovic |
---|---|
date | Tue, 27 Apr 2010 13:33:00 +0000 |
parents | 33850553b702 |
children | 8e660fd14774 |
line wrap: on
line diff
--- a/util/SL_A.m Tue Apr 27 13:32:46 2010 +0000 +++ b/util/SL_A.m Tue Apr 27 13:33:00 2010 +0000 @@ -1,20 +1,28 @@ - function y = SL_A(A, mode, m, n, x, I, dim) - % Ivan Damnjanovic 2009 - % This is auxilary function to allow implicit matrices from SPARCO - % to be used with SparsLab solvers - - global SMALL - if (mode == 1) +function y = SL_A(A, mode, m, n, x, I, dim) +%%% Sparco to SparseLab implicit matix conversion +% Centre for Digital Music, Queen Mary, University of London. +% This file copyright 2009 Ivan Damnjanovic. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +% +% This is auxilary function to allow implicit matrices from SPARCO +% to be used with SparsLab solvers + +if (mode == 1) - u = zeros(dim, 1); - u(I) = x; - y = A(u,1); - - elseif (mode == 2) + u = zeros(dim, 1); + u(I) = x; + y = A(u,1); - x2 = A(x,2); - y = x2(I); - - end - - end \ No newline at end of file +elseif (mode == 2) + + x2 = A(x,2); + y = x2(I); + +end + +end \ No newline at end of file