Unable to find explicit solution
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I tried solving an equation as shown below, and I was constantly getting this error - "Warning: Unable to find explicit solution. For options, see help". I am not able to understand what else to try, I wish to solve for 'y' and I have values for the other parameters, vf, a, x , m and psi predefined. How do I rectify this error?
syms psi x y vf a m
psi = 0.1;
r = 0.3;
a = r;
m = 1;
x = linspace(-10*r,10*r);
eqn = psi == norm(vf)*(y+m*atan2(y,x+a)-m*atan2(y,x-a));
sol = solve(simplify(eqn),y,'Real', true,'IgnoreAnalyticConstraints', true) ;
2 comentarios
darova
el 14 de Jun. de 2020
Did you try vpasolve or fsolve? I think solve can't handle it, it's complicated
Try numerical approach
Walter Roberson
el 14 de Jun. de 2020
vpasolve() cannot handle the situation because vf is not resolved.
Respuestas (1)
Walter Roberson
el 14 de Jun. de 2020
You are trying to solve for a single y value that satisfies all 100 equations simultaneously. That cannot work. You need to solve each of the equations independently:
syms psi x y vf a m
psi = 0.1;
r = 0.3;
a = r;
m = 1;
x = linspace(-10*r,10*r);
eqn = simplify(psi == norm(vf)*(y+m*atan2(y,x+a)-m*atan2(y,x-a)));
sol = arrayfun(@(EQN) solve(EQN,y,'Real', false,'IgnoreAnalyticConstraints', true), eqn, 'uniform', 0);
... This still will not be able to find the solutions, but that is because there is no solution for general vf
0 comentarios
Ver también
Categorías
Más información sobre Surrogate Optimization 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!