My script is below, whenever I enter this script into Matlab it returns to me my initial guess. I am curious Why? All help appreciated.
q = 10theta = 135Q = 600z = 20P = @(x,y) q*sin(theta)*x - q*cos(theta)*y - Q./(2*pi*z)*atan((x./y));D = []for x = -10:10; for y = -10:10; E= P(x,y); D = [D;E,x,y]; endend%to check if the equation T (psi) works for root finding equation
T = @(x,y) q*sin(theta)*x - q*cos(theta)*y - Q./(2*pi*z)*atan((x./y))-P(x,y);L = [];for x = -10:10; for y = -10:10; Q=T(x,y); L = [L;Q]; endendR=[]x = [];for y = -5:5;[yi]= fzero(@(x) T(x,y),25);x=[x;yi,y]end
Best Answer