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

조회 수: 2 (최근 30일)
onur karakurt
onur karakurt 2021년 5월 25일
댓글: Bandar 2021년 5월 26일
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
Bandar
Bandar 2021년 5월 26일
what is u?

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by