From: Amit Vishwas on
> "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message
> > If your system is not underdetermined, then
> > x = [real(A); imag(A)] \ [real(b); imag(b)]
> >
> > Bruno

Hi,

I am not able to understand the difference for using the "\" least squares solution for complex data in these 2 ways:

If I put simply the "\" as follows:

Wz = data\model and Wr = [real(data); imag(data)] \ [real(model); imag(model)]

so if I do Rz = data*Wz and R_r = real(data)*Wr, R_z = imag(data)*Wr, what I am supposed to infer out of it. As far as I understand, I should do a:
R = R_r + R_z.*1i

Note that the model I am fitting to is purely real and the data I am receiving is imaginary.
From: Bruno Luong on
"Amit Vishwas" <amit_pherein(a)yahoo.com> wrote in message <i0jumd$k13$1(a)fred.mathworks.com>...
> > "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message
> > > If your system is not underdetermined, then
> > > x = [real(A); imag(A)] \ [real(b); imag(b)]
> > >
> > > Bruno
>
> Hi,
>
> I am not able to understand the difference for using the "\" least squares solution for complex data in these 2 ways:
>
> If I put simply the "\" as follows:
>
> Wz = data\model and Wr = [real(data); imag(data)] \ [real(model); imag(model)]
>

Just to make sure, do you know the difference between "data\model" and "model\data"? Usually people carry out the regression by "model\data" or "data/model", very rarely they do the opposite.

Back to the question,
"model\data" provides least-square complex solution, whereas
[real(model); imag(model)] \[real(data); imag(data)] forces the solution to be real.

Of course the 2-norm of the residual of the second solution is general larger than the first solution because of the constraint.

Bruno

Bruno
From: Amit Vishwas on
Its the way the data is read into from beforehand, so I had to resort to this "inversion" to match the dimentions :)

> Just to make sure, do you know the difference between "data\model" and "model\data"? Usually people carry out the regression by "model\data" or "data/model", very rarely they do the opposite.
>
> Back to the question,
> "model\data" provides least-square complex solution, whereas
> [real(model); imag(model)] \[real(data); imag(data)] forces the solution to be real.
>
> Of course the 2-norm of the residual of the second solution is general larger than the first solution because of the constraint.

Thanks, that confirms what I was seeing, I was actually trying to look into the math that goes into solving these complex least squares, if you can direct me to any references, that would be just great!
> Bruno
From: Bruno Luong on
"Amit Vishwas" <amit_pherein(a)yahoo.com> wrote in message <i0oc16$hp0$1(a)fred.mathworks.com>...

>
> Thanks, that confirms what I was seeing, I was actually trying to look into the math that goes into solving these complex least squares, if you can direct me to any references, that would be just great!

Here is the reference:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/258076

Seriously I do not think one can find easily reference for almost too trivial algebra.

Bruno
From: Amit Vishwas on
No offense Bruno, but the "trivial math" is not so trivial if you want to understand the best way to implement it on hardware. Anyway, I think forums are not meant for a show of superiority or ignorance, I just thought this discussion could have been more productive. Thanks anyway!
> Seriously I do not think one can find easily reference for almost too trivial algebra.
>
> Bruno