Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The z coordinate of your function is computed in this line:</p> <pre><code> ILArray&lt;float&gt; z = ILMath.meshgrid(R * R, R, y); </code></pre> <p>Since meshgrid is actually used to create the X and Y coordinates for 2 dimensional function evaluation, only the R * R result goes into z. After that line, x,y and z look as follows: </p> <pre><code>x &lt;Single&gt; [5,5] [0]: 0,00000 1,25000 2,50000 3,75000 5,00000 [1]: 0,00000 1,25000 2,50000 3,75000 5,00000 [2]: 0,00000 1,25000 2,50000 3,75000 5,00000 [3]: 0,00000 1,25000 2,50000 3,75000 5,00000 [4]: 0,00000 1,25000 2,50000 3,75000 5,00000 y &lt;Single&gt; [5,5] [0]: 0,00000 0,00000 0,00000 0,00000 0,00000 [1]: 1,25000 1,25000 1,25000 1,25000 1,25000 [2]: 2,50000 2,50000 2,50000 2,50000 2,50000 [3]: 3,75000 3,75000 3,75000 3,75000 3,75000 [4]: 5,00000 5,00000 5,00000 5,00000 5,00000 z &lt;Single&gt; [5,5] [0]: 0,00000 1,56250 6,25000 14,06250 25,00000 [1]: 0,00000 1,56250 6,25000 14,06250 25,00000 [2]: 0,00000 1,56250 6,25000 14,06250 25,00000 [3]: 0,00000 1,56250 6,25000 14,06250 25,00000 [4]: 0,00000 1,56250 6,25000 14,06250 25,00000 </code></pre> <p>Obviously, z does only depend on x, which gets clear by the resulting surface: </p> <p><img src="https://i.stack.imgur.com/qmXlp.png" alt="Surface"></p> <p>So, the value of z would be: x * x. Or for your specific example: </p> <pre><code>x=2.2, y=1.6 z =4.84 </code></pre> <p>Edit: In case the underlying function is not known, you could either </p> <ul> <li>try to learn that function (using ridge_regression() or pinv()), or </li> <li>interpolate from the data of the neighboring grid points. </li> </ul> <p>There is currently no corresponding function (like 'interp2') in ILNumerics. However, in your case - where only one single point needs to be interpolated (?), one can find the neighboring grid points and use one of the common interpolation methods. </p> <p><strong>Edit</strong>: With the release of the <a href="http://ilnumerics.net/ilnumerics-interpolation-toolbox.html" rel="nofollow noreferrer">interpolation toolbox</a> things became significantly easier. You can now interpolate in any dimension in high speed and with a single line.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload