Matlab® offers lots of commands to create various kinds of 3D graphs and all of these commands are explained in Mechanicalland. Here, we explain a special command to create 3D graphs and projections of these graphs on the specified plane in Matlab®. This command is called the ‘meshc()’ command.
How To Use ‘meshc()’ Command In Matlab®?
Creating 3D graphs and projections is very easy in Matlab® with meshc() command as you see above. First of all, you need to create two vectors with the meshgrid() command as shown by the blue arrow above. These vectors are created and will be used for the 3D domain to illustrated the 3D graph on it.
Then you need to type an equation or polynomial by using these 2 created vectors with meshgrid() command, as shown in the blue box above. So you have three elements to obtain a 3D graph mathematically, that two of the vector variables and the other one is an equation that depends on these two variables.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
What you need to do finally is, just type these three elements in the meshc() command in Matlab® as shown by the green arrow. The last element will be the ‘plane’ that the projection of created 3D graph will be projected as shown by the red arrow above. In this example, this plane is the ‘Z’ plane, which we typed lastly in the meshc() command.
Also, you can add titles, legends, and other graph elements into your 3D graph in Matlab®. Also, you can pan, rotate, etc. this graph with your mouse. Click on the given link and see how to do this in Matlab®.
Creating 3D graphs with projections in Matlab® is very easy like above with the meshc() command.
Do not forget to leave your comments and questions about drawing 3D graphs with projections with meshc() command in Matlab® below. Your precious feedbacks are very important for us.
This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®
Your precious feedbacks are very important to us.