I am trying to create a list of instances where x is equal to y, where x and y are created by a nested for loop. However, the if statement seems to only run through the first iteration of the loop.
radiusincrement = 1;thetaincrement = 45;k=1;for i=1:1:5/radiusincrement %two for loops that will sweep through wafer points
for j=1:1:thetatotal r(i,j) = (i-1)*radiusincrement; theta(i,j) = (j-1)*thetaincrement; x(i,j) = r(i,j).*cos(theta(i,j).*pi/180); y(i,j) = r(i,j).*sin(theta(i,j).*pi/180); point = [x(i,j) y(i,j) 0]; if point(1)==point(2) kx(k)=x(i,j); ky(k)=y(i,j); k=k+1; end endend
What am I doing wrong? Thanks!
Best Answer