From: Dushyant on
I am trying to solve a ill-posed linear problem using temporal and spatial regularization. This code is supposed to work on MRI images where it would be dealing with 256 x 256 x 50 voxels in 3D or 256 x 256 in 2D at a time. So, this is going to be a large scale problem.

I know the explicit matrix as well as (matrix* x).
More details in the document @
http://docs.google.com/fileview?id=0B0Ah9soYnrlIOWRlMGE1M2MtYjNkNy00NWI0LTlhNWQtMDkwMThiMWE1MzNj&hl=en


Also the code is @
http://docs.google.com/leaf?id=0B0Ah9soYnrlIN2MzN2QyNDctYWVmYy00OWE4LWI2ZTUtMDZkMTRmYTBjZDRi&hl=en

I will be using it for 10000 to 1 million a voxel and over various regularization parameters. So, this problem is pretty large.
Right now, I am only working on 2 x 2 voxels and lsqnonneg works fine.
I am showing result from single voxel:
Red -> returned value
Blue -> simulation of expt data
To run:
Modify in the beginning of “Test_LSQNONNEG_n_SpatialReg”
Solver = 'lsqnonneg';
% % Solver = 'lsqlin';
And then [x2_3D,residual, resnorm,exitflag] = Test_LSQNONNEG_n_SpatialReg()


Resnorm = 9.18 x 10^-8

However, when I run lsqlin:
% % Solver = 'lsqnonneg';
Solver = 'lsqlin';

And then

[x2_3D,residual, resnorm,exitflag] = Test_LSQNONNEG_n_SpatialReg()


Resnorm = 1.12 x 10^-5
I could not lower the “Resnorm” value.