MATLAB essential/How to draw 2D and 3D shapes

Open your MATLAB or go to this website if you do not have access to MATLAB on your PC. If you want to use the editor (script on the left) make sure to save your work using the drop-down menu before running it

It is very important to know how to define a function, review this lecture,

3D plotting

Table of the most important functions in 2D plotting.

function purpose example
hold on and hold off
xlable, ylable, zlable
plot
ezplot
meshgrid
subplot

Table of the most important functions in 3D plotting.

Do you have a question about the material covered, Click here to send me an email.

graph with source code