How to plot a function which takes 2 inputs and spit out a single output

Hello,
Thanks in advance. I have a data set in whcih I have 4 coloumns. Two of the coloumns are input and other two are output.An example data set is attached.
In the data set, Y1 = F(X1,X2) and Y2 = G(X1,X2) where F and G are distinct functions. I am trying to plot the data where x and y axis are X1 and X2 respectivily and z axis shows the F and G values.
Do you know a method/matlab function to plot such a way? Please make it as simple as possible.
Thanks again.

Answers (1)

trimesh is a possibility,
T = delaunay(X1,X2);
subplot(1,2,1)
trimesh(T,X1,X2,Y1)
subplot(1,2,2)
trimesh(T,X1,X2,Y2)

Categories

Asked:

on 6 Apr 2023

Edited:

on 6 Apr 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!