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

1 次查看(过去 30 天)
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 个评论
onur karakurt
onur karakurt 2021-5-26
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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by