I am trying to plot the following function in MATLAB:
The goal is to stitch all of the different conditions into one graph to make an overall CDF graph. What I have tried so far is the following:
x=linspace(0,1,20);
y=linspace(0,1,20);
Z=x.^y;
plot3(x,y,Z)
hold on
plot3(x,0,0);
plot3(0,y,0);
I am unsure of how to graph 1 for x>1, y>1
and also if there is a way to make the plot a solid surface for this set of conditions. I have tried using the rand()
generator to produce 20+ numbers between 0
and 1
, which shows the area that the variables could be located. However, it looks messy when it's a scatter of lines in a given area. I would rather it be a solid surface.
Is there a specific command I can use for this? I have seen in some examples using Mesh()
to make the graph solid but am not sure if this would work for the set of data.