MATLAB: Solve always returns 0x1 sym results for a non linear system of equations, symbolic toolbox

nonlinearsolvesymbolicSymbolic Math Toolbox

Hi!
Can someone help me out with this please? I try to solve this nonlinear system of equations but solve always give me a 0x1 sym result for all the unknown parameters (A,I,V,alfa, gamma, fi)! I have also tried to use vpasolve but it gives me the same results!
I am using MATLAB R2017a!
Thanks in advance!
clear all
clc
n=1;
r=0.1;
A0=r^2*pi;
I0=(2*r)^4*pi/64;
ro=2700;
E=210*10^9;
w=100;
l=1;
syms x
V = sym('V', [1 n]);
I = sym('I', [1 n]);
A = sym('A', [1 n]);
fi= sym('fi', [1 n]);
gamma=sym('gamma', [1 n]);
alfa=sym('alfa', [1 n]);
for oszlop=1:n
vvektor(oszlop)=V(oszlop)*exp(1j*oszlop*x/l+fi(oszlop));
Ivektor(oszlop)=I(oszlop)*exp(1j*oszlop*x/l+gamma(oszlop));
Avektor(oszlop)=A(oszlop)*exp(1j*oszlop*x/l+alfa(oszlop));
end
v=sum(vvektor);
i2=sum(Ivektor)+I0;
a=sum(Avektor)+A0;
clear vvektror Ivektor;
baloldal=i2*diff(v,x,4)-2*diff(i2,x,1)*diff(v,x,3)+diff(i2,x,2)*diff(v,x,2);
jobboldal=ro*a*w*w/E;
xvektor=linspace(0,l,6*n);
for k=1:numel(xvektor)
baloldalvektor(k)=subs(baloldal,x,xvektor(k));
jobboldalvektor(k)=subs(jobboldal,x,xvektor(k));
end
for k=1:numel(xvektor)
eqns(k)=baloldalvektor(k)-jobboldalvektor(k)==0;
end
S=solve(eqns,A,V,I,alfa,fi,gamma,'IgnoreAnalyticConstraints', true)

Best Answer

Solve always returns 0x1 because your equations are not compatible. To demonstrate if, solve the first and second equations with respect to A.
A1 = solve(eqns(1),A);
A2 = solve(eqns(2),A);
Take the difference, and simplify the results.
diffA = simplify(A1-A2);
If you look closely at the results, you see that diffA cannot be null for a finite value of alfa. Therefore, the equations are not compatible.
There is probably a problem somewhere in your equations.