why am i getting ans = Empty sym: 0-by-1

8 visualizaciones (últimos 30 días)
MARTINS Preimanis
MARTINS Preimanis el 8 de Dic. de 2021
Respondida: Star Strider el 8 de Dic. de 2021
clc
%variables
syms X Y;
solve (cos(X+0.5)+Y==0.8,X)
solve (sin(Y)-2*X==1.6,Y)
%convergence
G1(Y)=-acos(4/5 - Y) - 1/2;
G2(X)=pi - asin(2*X + 8/5);
%Derivative
G1X=diff(G1,X)
G1Y=diff(G1,Y)
G2X=diff(G2,X)
G2Y=diff(G2,Y)
%convergence limits
solve(-2/(1 - (2*X + 8/5)^2)^(1/2)==1)
solve(-2/(1 - (2*X + 8/5)^2)^(1/2)==-1)
solve(-1/(1 - (Y - 4/5)^2)^(1/2)==1)
solve(-1/(1 - (Y - 4/5)^2)^(1/2)==-1)
after convergence limits i am getting ans = Empty sym: 0-by-1, why is this and how to fix it
ans =
Empty sym: 0-by-1
ans =
- (3^(1/2)*1i)/2 - 4/5
(3^(1/2)*1i)/2 - 4/5
ans =
Empty sym: 0-by-1
ans =
4/5

Respuesta aceptada

Star Strider
Star Strider el 8 de Dic. de 2021
There’s no “there” there!
When in doubt, plot! The plot of a funciton tells essentially everything that needs to be known about its behaviour.
The first and third functions never reach +1 so there is no solution to either of them.
%variables
syms X Y;
solve (cos(X+0.5)+Y==0.8,X)
ans = 
solve (sin(Y)-2*X==1.6,Y)
ans = 
%convergence
G1(Y)=-acos(4/5 - Y) - 1/2;
G2(X)=pi - asin(2*X + 8/5);
%Derivative
G1X=diff(G1,X)
G1X(Y) = 
0
G1Y=diff(G1,Y)
G1Y(Y) = 
G2X=diff(G2,X)
G2X(X) = 
G2Y=diff(G2,Y)
G2Y(X) = 
0
%convergence limits
eq1 = -2/(1 - (2*X + 8/5)^2)^(1/2)-1
eq1 = 
figure
fplot(eq1,[-2 0])
grid
ylim([-25, 5])
solve(-2/(1 - (2*X + 8/5)^2)^(1/2)==1, X)
ans = Empty sym: 0-by-1
solve(-2/(1 - (2*X + 8/5)^2)^(1/2)==-1)
ans = 
eq2 = -1/(1 - (Y - 4/5)^2)^(1/2)-1
eq2 = 
solve(-1/(1 - (Y - 4/5)^2)^(1/2)==1)
ans = Empty sym: 0-by-1
figure
fplot(eq2,[-0.5 2])
grid
ylim([-25, 5])
solve(-1/(1 - (Y - 4/5)^2)^(1/2)==-1)
ans = 
.

Más respuestas (0)

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by