I have 2 variables and data points corresponding to them and so would like to plot this (I think using the plot3 function for a 3D graph) but I'm having trouble writing my code.(adsbygoogle = window.adsbygoogle || []).push({});

Each variable ranges from 0 to 1 (in 0.1 intervals) and so this would be the x and z axis, and I have data points corresponding to each variable point in 11 by 11 matrix (which would be plotted on the y axis).

Since the data all has to be in matrices (or vectors) of the same size, I made my x and z values into matrices, and used this function:

plot3(z,y,x,'DisplayName','z,y,x');figure(gcf)

but the figure doesn't look right and I'm not sure what I'm doing wrong.

Please help!

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# 3D plot help

**Physics Forums | Science Articles, Homework Help, Discussion**