I’m working with a quadratic surface f(w0,w1) on MATLAB and I used meshgrid to create this. Here’s the code:
phi = 0.01;
M = 16;
[w0,w1] = meshgrid(-2:0.1:8 , -10:0.1:0);
f = (0.5+phi)*(w0.^2 + w1.^2) + w0.*w1*cos(2*pi/M) + 2*w1*sin(2*pi/M) + 2;
So I would like to know how can I obtain the value of the function f at the point (-1.9,-0.9), for example.
Thanks
You could either plug your values directly in the function f:
or use indices on x and y:
Both methods will return: