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

1 view (last 30 days)
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 Comments
onur karakurt
onur karakurt on 26 May 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

Sign in to comment.

Answers (0)

Tags

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!