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일
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 CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by