I have a series of measurements made over a 2D space. The measurements come as [x, y] and M where x,y are the coordinates of where the measurement was made and M is the result of the measurement. I want to use these measurements to update a 2D grid of values, let’s say dim [11,11], that represents my knowledge of the underlying function on a 1 meter grid. The 2D grid can be considered a discretized basis the underlying function.
The x and y of each measurement are not discretized with each of x and y ranging from 0 to 10. I would like to convert each incoming measurement into a dim [11,11] tensor where the value of the tensor is zero everywhere except in the vicinity of x,y. For example:
If x,y were 0,0 I want the [1,1] location of the tensor to be M.
If x,y were 0.5,0.5, I want locations [1,1], [1,2], [2,1] and [2,2] to each be M/4 etc.
If x,y were 10,10, I want location [11,11] to be M