can anyone helpp me ???? How does the vpasolve command work

1 visualización (últimos 30 días)
onur karakurt
onur karakurt el 25 de Mayo de 2021
Comentada: Bandar el 26 de Mayo de 2021
Hello,
How does the vpasolve command work, ı am trying vpasolve function without "syms" , also 2 variable are array. How can I solve this equation.?
can it be solved the eqns.? it is logical?
clear all;clc;
a=0.25
phi=1;
theta=linspace(-2*pi,2*pi,100);
x=real(complex(phi,theta));
y=imag(complex(phi,theta));
eqn1=@(u,v,x,y)(2*u*((x.*(u.*y+v.*x)+y(u.*x-v.*y))./(x.^2+y.^2)+a.^2.*(x.*(u.*x+v.*y)-y(u.*x+v.*y))./((u.*x-v.*y).^2+(u.*y+v.*x).^2))/(2-((x.*(u.*x-v.*y)-y(u.*y+v.*x))./(x.^2+y.^2)+a.^2.*(x.*(u.*x-v.*y)+y(u.*y+v.*x))./((u.*x-v.*y).^2+(u.*y+v.*x).^2))))-v==0
eqn2=@(u,v,x,y)(v*((x.*(u.*x-v.*y)-y(u.*y+v.*x))./(x.^2+y.^2)+a.^2.*(x.*(u.*x-v.*y)+y(u.*y+v.*x))./((u.*x-v.*y).^2+(u.*y+v.*x).^2))/(2*v-2*((x.*(u.*y+v.*x)+y(u.*x-v.*y))./(x.^2+y.^2)+a.^2.*(x.*(u.*x+v.*y)-y(u.*x+v.*y))./((u.*x-v.*y).^2+(u.*y+v.*x).^2))))-u==0
for i=1:size(x)
[usol, vsol]=vpasolve(@(u,v)eqn1(u,v,x(i),y(i)),@(u,v)eqn2(u,v,x(i),y(i)),u,v)
end
ERROR:
Unrecognized function or variable 'u'.
Error in deneme (line 18)
[usol, vsol]=vpasolve(@(u,v)eqn1(u,v,x(i),y(i)),@(u,v)eqn2(u,v,x(i),y(i)),u,v)
  3 comentarios
onur karakurt
onur karakurt el 26 de Mayo de 2021
I simplified the equations, x and y are array, u and v are unknown, can I solve "vpasolve" function without "syms". Bcause ı am trying to make *.m function

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by