Let add_term to be a real valued matrix evaluated at each point of the 2D space as
[xx, yy] = ndgrid(1:100, 1:100);
add_term = exp(-((xx-50).^2 + (yy-50).^2))
figure; mesh(xx, yy, add_term); % should resemble a bell function centered in (50, 50)
constraints = [];
objective = 0;
for k = 1:N
objective = objective + norm(Q*x{k},2) + norm(R*u{k},2) + add_term(x{k}(1), x{k}(3));
constraints = [constraints, x{k+1} == A*x{k} + B*u{k}];
constraints = [constraints, -100 <= u{k}<= 100, 0<=x{k+1}<=100];
end