can anyone helpp me ???? How does the vpasolve command work
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!