|
Hi all,
I am trying to fit a function to 4D points and find the minimum of this function.
The matrix will always be 3x3x3 and the central point, Index(2,2,2), will always be the smallest (error) value. I.e. the matrix is formed by taking the values of all surrounding 26-connected indices around the minimum error. I've been thinking of it as a Rubik's cube for the purpose of visualizing
Here's an idealized example of what I have:
Err = 5*ones(3,3,3);
Err(2,2,2) = 2;
In this case the true minimum of Err will be at Err(2,2,2) since all surrounding values are equal making the middle the minimum peak.
Here's a more realistic example of what I have:
Err = ceil(rand(3,3,3)*10)+5;
Err(2,2,2) = 2;
Thus the true minimum lies somewhere (randomly) around the center.
Once I have this minimum it should be easy enough to get the minimum at the desired resolution by just fitting a mesh to the function and finding it's minimum. (Is this a good idea? computational expense is very important)
Thank you ahead of time for your help,
-Sean
|