Derivative on scatter data in Matlab
<p>I have some data collected from a GPS network. My data consist of two arrays of the station coords (lat, long) and another two arrays populated with the vertical and the horizontal velocity of each station.
My script for interpolating is:</p>

<pre><code>clear all; clc; format compact
load('lat_long_Ve_Vn.mat');
x = 34.5:0.1:42;
y = 19:0.1:28.5;
[Xq,Yq] = meshgrid(x,y);
Ve_i = griddata(lat,long,Ve,Xq,Yq);
Vn_i = griddata(lat,long,Vn,Xq,Yq);
</code></pre>

<p>I get the interpolated data for each node on my grid with two vectors, <code>Ve_i</code> and <code>Ve_n</code>
I want to calculate the following derivatives but I have no idea on how to do it.
<a href="https://i.stack.imgur.com/kK9JK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kK9JK.png" alt="fasdfa"></a></p>

<p>I should mention that <code>Vx</code> is my <code>Ve_i</code> and <code>Vy</code> is my <code>Vn_i</code>, and I don't have a mathematical formula so I can calculate the derivatives with MuPAD. Any idea on how to do it?</p>