I am struggling with something that should not be too hard; I have three variables (x,y,z) and an outcome (e), and I know the relationship between them. Let's for the sake of it assume that the relationship is as follows:
e = x + y.^2 + (4/z)
Now, what I want to do is create a plot in MATLAB that shows me this function, with the three variables on the respective axes, and the color reflecting the outcome (e). I know it probably has something to do with meshgrid
and surf
, but from the way I see it, those can only plot three variables total, and not four, as in my case.
Thanks in advance for your help,