From: Dushyant Kumar on
I have linear equation to solve.

Y = AX + nois

A is quite sparse and sparsity pattern is shown in figure 3.
http://docs.google.com/fileview?id=0B0Ah9soYnrlIOWRlMGE1M2MtYjNkNy00NWI0LTlhNWQtMDkwMThiMWE1MzNj&hl=en

lsqlin vs lsqnonneg
---------------------------
lsqnonneg works fine and returns resnorm of 9 10^-8

while lsqlin returns peaky solution and the resnorm of 1.12 10^-5.

The returned solution in this case is barely ok, not as good as in the case of lsqnonneg. Please have a look at the last page of aforementioned word doc.

First figure on last page is solution using lsqnonneg (red) vs simulated (blue).

Last figure is solution using lsqlin (red) vs simulated (blue).
From: Dushyant Kumar on
so, I want help regarding this part of my code:

===================================================
if strcmp(Solver, 'lsqlin')
ub =[];
lb = zeros(length(x2_1D_NoRegul),1);
A = []; b = [];
options = optimset('MaxIter', 10000, 'TolFun',1*eps,'TolX',1e-6, 'MaxFunEvals',1800);
[x2_1D_SimultReg,resnorm,residual,exitflag,output] = lsqlin(AComp, y_exp_1D_Reg,A,b,[ ],[ ],lb,ub,x2_1D_NoRegul,options);
figure(2)
end
===================================================

I need help to adjust tolx, tolfun etc so that it runs till resnorm is comparable to that returned using lsqnonneg (resnorm = 9 10^-8). Currently using lsqlin, the resnorm
is 1.12 10^-5. I tried to change tolfun, tolx etc; but did not have any effect on resnorm

The code is at:
http://docs.google.com/leaf?id=0B0Ah9soYnrlINjJlOTcwMDktNjQzNi00MTFiLTg0YjQtN2UwZTZmNjY4ZmNk&hl=en
From: Steven Lord on

"Dushyant Kumar" <duk(a)med.cornell.edu> wrote in message
news:htm662$si8$1(a)fred.mathworks.com...
>I have linear equation to solve.
>
> Y = AX + nois
>
> A is quite sparse and sparsity pattern is shown in figure 3.
> http://docs.google.com/fileview?id=0B0Ah9soYnrlIOWRlMGE1M2MtYjNkNy00NWI0LTlhNWQtMDkwMThiMWE1MzNj&hl=en
>
> lsqlin vs lsqnonneg
> ---------------------------
> lsqnonneg works fine and returns resnorm of 9 10^-8
> while lsqlin returns peaky solution and the resnorm of 1.12 10^-5.
>
> The returned solution in this case is barely ok, not as good as in the
> case of lsqnonneg. Please have a look at the last page of aforementioned
> word doc.
>
> First figure on last page is solution using lsqnonneg (red) vs simulated
> (blue).
>
> Last figure is solution using lsqlin (red) vs simulated (blue).

I believe I remember that you asked about this in another thread, but I
don't remember the problem description. Since you started a NEW thread and
I don't have the time to go searching for the new one you may have already
answered this, but why not simply use the backslash operator? [This is why
you should use one thread per problem -- it keeps the context flow.]

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Dushyant Kumar on
"Steven Lord" <slord(a)mathworks.com> wrote in message
>
> I believe I remember that you asked about this in another thread, but I
> don't remember the problem description. Since you started a NEW thread and
> I don't have the time to go searching for the new one you may have already
> answered this, but why not simply use the backslash operator? [This is why
> you should use one thread per problem -- it keeps the context flow.]
>
> --
> Steve Lord
>
I am new at matlab and mathworks. Hence, when I did not get much response, I created new one with much simplified version of my problem. My apologies...

The problem description is located at:
http://docs.google.com/fileview?id=0B0Ah9soYnrlIOWRlMGE1M2MtYjNkNy00NWI0LTlhNWQtMDkwMThiMWE1MzNj&hl=en

Original equation is:
(i) Y(TE) = sum over i (C_i * exp(-TE/ T2_i))

No of TE = 50; There are 100 possible values of T2_i.

(ii) I want to extract histogram of T2_i vs C_i;

Also T2_i > 0

and T2_i are logarithmically spaced point between 5 ms to 600 ms.
T2_Scale = logspace(log10(5e-3), log10(600e-3), 100);

For most of T2_i, C_i is zero. I can solve it using lsqnonneg active set.

(iii) Then I add regularization and that makes
# of unknowns < no of equation. I can solve it using lsqlin or lsqnonneg.

Histogram returned by lsqlin is not as satisfactor as that return by lsqnonneg.
See last two figure of document
http://docs.google.com/fileview?id=0B0Ah9soYnrlIOWRlMGE1M2MtYjNkNy00NWI0LTlhNWQtMDkwMThiMWE1MzNj&hl=en

(iv) lsqlin exits with flag 3 before it can reach desired resnorm. If I can make it run till desired resnorm, I believe I would be fine
From: Dushyant Kumar on
Any help would be appreciated...
 |  Next  |  Last
Pages: 1 2 3
Prev: Low pass filter
Next: Multiple Bar Graphs