Skip to main content
added 525 characters in body
Source Link
Federico Poloni
  • 20.2k
  • 2
  • 82
  • 120

No, the first line is not equivalent to what you claim in the text, I believe: that's one linear system containing a subtraction and not two separate linear systems.

In detail, the matrix of this linear system is obtained by concatenating horizontally M = real(A) and N = imag(A(:,2:n+1)). If you split the unknown into $$ c = \begin{bmatrix} a\\-b \end{bmatrix} $$ then this linear system is $$ f = \begin{bmatrix}M & N\end{bmatrix} \begin{bmatrix} a\\-b \end{bmatrix} = Ma - Nb, $$ which corresponds to your first formula. But, ultimately, you are solving one linear system with matrix $\begin{bmatrix} M & N\end{bmatrix}$. The instruction [real(A) imag(A(:,2:n+1))] stacks matrices one next to the another; it is not a "vectorized" syntax to solve two linear systems with different matrices and the same RHS.

I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

No, the first line is not equivalent to what you claim in the text, I believe: that's one linear system containing a subtraction and not two separate linear systems.

In detail, the matrix of this linear system is obtained by concatenating horizontally M = real(A) and N = imag(A(:,2:n+1)). If you split the unknown into $$ c = \begin{bmatrix} a\\-b \end{bmatrix} $$ then this linear system is $$ f = \begin{bmatrix}M & N\end{bmatrix} \begin{bmatrix} a\\-b \end{bmatrix} = Ma - Nb, $$ which corresponds to your first formula. But, ultimately, you are solving one linear system with matrix $\begin{bmatrix} M & N\end{bmatrix}$.

I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

No, the first line is not equivalent to what you claim in the text, I believe: that's one linear system containing a subtraction and not two separate linear systems.

In detail, the matrix of this linear system is obtained by concatenating horizontally M = real(A) and N = imag(A(:,2:n+1)). If you split the unknown into $$ c = \begin{bmatrix} a\\-b \end{bmatrix} $$ then this linear system is $$ f = \begin{bmatrix}M & N\end{bmatrix} \begin{bmatrix} a\\-b \end{bmatrix} = Ma - Nb, $$ which corresponds to your first formula. But, ultimately, you are solving one linear system with matrix $\begin{bmatrix} M & N\end{bmatrix}$. The instruction [real(A) imag(A(:,2:n+1))] stacks matrices one next to the another; it is not a "vectorized" syntax to solve two linear systems with different matrices and the same RHS.

I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

added 525 characters in body
Source Link
Federico Poloni
  • 20.2k
  • 2
  • 82
  • 120

No, the first line is not equivalent to what you claim in the text, I believe: that's one linear system containing a subtraction and not two separate linear systems.

In detail, the matrix of this linear system is obtained by concatenating horizontally M = real(A) and N = imag(A(:,2:n+1)). If you split the unknown into $$ c = \begin{bmatrix} a\\-b \end{bmatrix} $$ then this linear system is $$ f = \begin{bmatrix}M & N\end{bmatrix} \begin{bmatrix} a\\-b \end{bmatrix} = Ma - Nb, $$ which corresponds to your first formula. But, ultimately, you are solving one linear system with matrix $\begin{bmatrix} M & N\end{bmatrix}$.

I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

No, the first line is not equivalent to what you claim in the text, I believe: that's a subtraction and not two separate linear systems. I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

No, the first line is not equivalent to what you claim in the text, I believe: that's one linear system containing a subtraction and not two separate linear systems.

In detail, the matrix of this linear system is obtained by concatenating horizontally M = real(A) and N = imag(A(:,2:n+1)). If you split the unknown into $$ c = \begin{bmatrix} a\\-b \end{bmatrix} $$ then this linear system is $$ f = \begin{bmatrix}M & N\end{bmatrix} \begin{bmatrix} a\\-b \end{bmatrix} = Ma - Nb, $$ which corresponds to your first formula. But, ultimately, you are solving one linear system with matrix $\begin{bmatrix} M & N\end{bmatrix}$.

I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)

Source Link
Federico Poloni
  • 20.2k
  • 2
  • 82
  • 120

No, the first line is not equivalent to what you claim in the text, I believe: that's a subtraction and not two separate linear systems. I suspect that's the source of the issue (and, also, possibly, not solving the linear system in the least-squares sense.)