Donald R. Fredkin wrote:
>
>
> "anne smith" <anne.smith@nospam.com> wrote in
> news:eefc33b.1@webx.raydaftYaTP:
>
>> Hello,
>>
>> I am using LSQLIN to solve X in the expression:
>> P(11,1)=M(11,9)*X(9,1)+Error(11,1)
>> subject to: sum(X)=1 and 0<=X<=1
>> In MATLAB:
>>
>> X=LSQLIN(M,P,[],[],Aeq,beq,LB,UB);
>> Aeq=ones(1,9);
>> beq=1;
>> LB=0*ones(1,9);
>> UB=1*ones(1,9);
>>
>> and then i am doing a linear transformation of my data by
> multiplying
>> P and M times a constant
>>
>> (A.*P)=(A.*M)*X + Error
>>
>> Where A is a vector storing 11 constants (recall that P and M
> have 11
>> rows)
>>
>> my question is that i thought that this linear trasnformation
> should
>> NOT change my output since i am only introducing a constant
> factor
>
> Let's make the transformation a little more general: Take A to be
> an 11 X 11 nonsingular matrix, and make the replacements
> P > A*P, M > A*M. (In your case, A is diagonal, and the
> elements on the diagonal are the elements of your vector A.) Now,
> in your original problem you ask LSQLIN to minimize
> (P  M*X)' * (P  M*X). In the new problem, you ask to minimize
> (P  M*X)' * (A' * A) * (P  M*X), which is different. In your
> case of a diagonal A, you have changed the weights in your least
> squares problem.
>
> The solution to the new problem is different from the solution to
> the old one.
>
hello and thanks for your answer,
still i have a problem to see why the problem has a different
solution because MATLAB is minimising
(P  M*X)' * (A' * A) * (P  M*X)
where A' * A is an scalar, just a factor so why the minimum of a
function and the minimum of the same function times a factor is
changing its position (X).
i thought that i was just going to get a bigger residual or RMSE but
no, the solution is different....
thanks,
anne
