I have a data set of the type $\{x,y,z\}$ where $(x,y)$ is a point and $z$ is the "value" or magnitude at that point. This gives me a triangular sort of shape since $(x,y,z)$ is not defined along the whole possibility set considering it is real data. Is there any way I can get a gradient using the points I have (using them if possible) and using the interpolation from Mathematica otherwise?
|
I'll try to give you an answer complementary to Szabolcs’, because I understood your question in another way. If by “get a gradient using the points I have” you mean having a continuous color gradient in your plot of the data (and not calculating a gradient, as in “derivative”), then you can simply use Let's get some data, taken at random points from the function $z=\sin x\ \sin y$:
then plot it:
which you can compare to the original function I drew points from:
|
|||
|
|
|
Your question is not very clearly formulated, but if I understand it correctly:
You can do this by interpolating linearly, then taking the gradient of the interpolated function. Example: Let's generate some data:
Let's interpolate:
You can get the gradient by
The interpolated function looks like this:
(Note: here I used |
||||
|
|




