jaejoon89
- 187
- 0
Using MATLAB, how do you evaluate a function at integer values, say 1 to 1000, of x and y? For simplicity, let's say the function is z = x + y.
z = zeros(1000);
for x= 1:1000
for y = 1:1000
z(x,y) = x + y;
end
end
[x y] = meshgrid(1:1000);
z = x + y;