Why does the following for loop produce the error "Indexing with parentheses '()' must appear as the last operation of a valid indexing expression"?
data matrix (1000×4)
Pass = [];for i = 1:size(xt) for j = 1:size(x) if (sqrt((x(j,1)-xt(i,1)^2)+(y(j,1)-yt(i,1))^2))<2 if (ismember(j,Pass)(1)==0) Pass = [Pass j]; end end endenddisp(Pass);
Best Answer