- plot3: This function is used to create 3D line plots. It takes three vectors representing the x, y, and z coordinates of the points and connects them with lines.
- scatter3: This function is used to create 3D scatter plots. It takes three vectors representing the x, y, and z coordinates of the points and plots them as individual markers.
- surf: This function is used to create 3D surface plots. It takes a matrix of z-values and generates a surface plot based on the x and y coordinates.
- mesh: This function is similar to surf and creates a wireframe mesh plot. It takes a matrix of z-values and generates a mesh plot based on the x and y coordinates.
- contour3: This function creates 3D contour plots. It takes a matrix of z-values and generates contour lines at specified levels based on the x and y coordinates.
what is the right 3D plotting function for my code?
1 次查看(过去 30 天)
显示 更早的评论
Hi all, I have a simple question about 3D plotting.
Consider this simple loop, which provides y and O for any x. and I am able to plot y vs O for given x.
for Omega=0:.01:5
y(i)=(x*Omega^2);
O(i)=Omega;
i=i+1;
end
now consider I want to change the value of x, for x=0:.1:3 and plot the group of y's and O's in one plot.(y~O~x) which one of the 3D plot functions are right for this purpose and what will be the code?
I would appreciate you time and help,
Romik
0 个评论
回答(1 个)
SAI SRUJAN
2023-10-6
Hi Romik,
I can understand that you uncertain about the appropriate choice of a 3D plotting function to address your requirements.
The selection of a specific 3D plotting function is contingent upon the unique requirements and objectives of the use case at hand..In MATLAB, there are several functions available to plot in 3D. Here are some commonly used functions for 3D plotting:
For further insights, I have provided links to relevant documentation.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!