# Solving system of equations

2 visualizaciones (últimos 30 días)
BeeTiaw el 1 de En. de 2018
Comentada: Jan el 25 de Abr. de 2019
Hi expert,
May I ask your suggestion on how to solve the following matrix system,
where the component of the matrix A is complex numbers with the angle (theta) runs from 0 to 2*pi, and n = 9. The known value z = x + iy = re^ia, is also complex numbers as such, r = sqrt(x^2+y^2) and a = atan (y/x)
Suppose matrix z is as shown below,
z =
0 1.0148
0.1736 0.9848
0.3420 0.9397
0.5047 0.8742
0.6748 0.8042
0.8419 0.7065
0.9919 0.5727
1.1049 0.4022
1.1757 0.2073
1.1999 0
1.1757 -0.2073
1.1049 -0.4022
0.9919 -0.5727
0.8419 -0.7065
0.6748 -0.8042
0.5047 -0.8742
0.3420 -0.9397
0.1736 -0.9848
0 -1.0148
How do you solve the system of equations above i.e. to find the coefficient of matrix alpha. I tried using a simple matrix manipulation X = inv((tran(A)*A))*tran(A)*z, but I cannot get a reasonable result.
I would expect the solution i.e. components of matrix alpa to be a real numbers.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Matt J el 1 de En. de 2018
Editada: Matt J el 1 de En. de 2018
What do the two columns of z mean? Is the 2nd column supposed to be the imaginary part of z? If so,
Z=complex(z(:,1),z(:,2));
X = A\Z
##### 11 comentariosMostrar 9 comentarios más antiguosOcultar 9 comentarios más antiguos
Matt J el 17 de Feb. de 2018
If the first value is 1, then this just leads to a mild modification of my initial proposal,
zc=complex(z(:,1),z(:,2));
alpha=A(:,2:end)\(zc-A(:,1))
This solves for the unknown alpha (alpha2,...,alphaN).
Jan el 25 de Abr. de 2019
@BeeTiaw: Which code do you consider as correct? What does "it seems that I have not got the right answer" mean? Which answer from which code to which input is meant here?

Iniciar sesión para comentar.

### Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by