Suggestions on solving this complex-vector-nonlinear system of equations in MATLAB

1 回表示 (過去 30 日間)
I have this equation in here:
W is a vector with a component in the real numbers and one in the imaginary numbers (At the end it's just like an x component and y component), same with Z and delta 2 and delta 3.
I want to know about ways to solve this using Matlab or something in Toolbox, I already tried to debunk the equation to get a 4x4 non linear equation and I solved it
clc
clear all
syms wx zx wy zy
alfa2=205*(pi/180);
alfa3=55*(pi/180);
beta2=39*(pi/180);
beta3=94*(pi/180);
delta2x=0.2;
delta2y=1.2;
delta3x=-0.75;
delta3y=2.5;
E1=wx*cos(beta2)-wx+wy*sin(beta2)+zx*cos(alfa2)-zx+zy*sin(alfa2)-delta2x;
E2=wx*sin(beta2)+wy*cos(beta2)-wy+zx*sin(alfa2)+zy*cos(alfa2)-zy-delta2y;
E3=wx*cos(beta3)-wx+wy*sin(beta3)+zx*cos(alfa3)-zx+zy*sin(alfa3)-delta3x;
E4=wx*sin(beta3)+wy*cos(beta3)-wy+zx*sin(alfa3)+zy*cos(alfa3)-zy-delta3y;
result=vpasolve([E1,E2,E3,E4], [wx,zx,wy,zy],[1,1,1,1])
result = struct with fields:
wx: -271.19634086868016733135733625065 zx: -47.962983642784204963593838989701 wy: -272.97936518137371030777492742679 zy: -47.612878234770207671139896881546
I wanna know any other way to solve it in Matlab

採用された回答

Torsten
Torsten 2022 年 6 月 15 日
編集済み: Torsten 2022 年 6 月 15 日
This is a simple linear system of equations in the unknowns W and Z:
alpha2 = 205*(pi/180);
alpha3 = 55*(pi/180);
beta2 = 39*(pi/180);
beta3 = 94*(pi/180);
delta2x = 0.2;
delta2y = 1.2;
delta2 = delta2x + 1i*delta2y;
delta3x = -0.75;
delta3y = 2.5;
delta3 = delta3x + 1i*delta3y;
A = [exp(1i*beta2)-1.0,exp(1i*alpha2)-1.0 ; exp(1i*beta3)-1.0,exp(1i*alpha3)-1.0];
b = [delta2;delta3];
sol = A\b;
W = sol(1)
W = 1.5417 - 0.8889i
Z = sol(2)
Z = 0.0044 - 0.0176i
  2 件のコメント
José David Castillo Blanco
José David Castillo Blanco 2022 年 6 月 16 日
Thanks for the aswer, didn't know it was linear.
José David Castillo Blanco
José David Castillo Blanco 2022 年 6 月 16 日
Don't worry mr, I already did it, I leave the code if anyone is interested
clc
clear all
syms W Z
alfa2=205*(pi/180);
alfa3=55*(pi/180);
beta2=39*(pi/180);
beta3=94*(pi/180);
delta2=0.2+1.2i;
delta3=-0.75+2.5i;
E1=W*(exp(1i*beta2)-1)+Z*(exp(1i*alfa2)-1)-delta2;
E2=W*(exp(1i*beta3)-1)+Z*(exp(1i*alfa3)-1)-delta3;
result=vpasolve([E1,E2],[W,Z])
Thanks for the help

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by