If I define a function like this
function [x, y] = findXY(B)
[by, bx] = size(B);
x = zeros(by,bx);
y = zeros(by,bx);
for i=1:10
x(i) = i;
y(i) = i;
end
end
I get the following error
The constructor for class 'findXY' must return only one output value.
Why is this happening? I can't use return values in a loop? I didn't find something similar while googling.