Graphs with MATLAB (Taken from

Graphs with MATLAB (Taken from "MATLAB for Beginners: A Gentle Approach")

By Peter I. Kattan

  • Release Date: 2012-10-07
  • Genre: Engineering

Description

This concise article of thirty pages takes you on a short tour on how to plot graphs using MATLAB. The presentation covers both two-dimensional and three-dimensional graphs. It is shown first how to plot a simple two-dimensional curve between two x and y vectors. This is followed by different commands to control the appearance of this curve – using color, curve type, legend, title, etc. Then it is shown how to plot two curves on the same graphs, followed by plotting four graphs on the same paper. Finally, different types of three-dimensional graphs are plotted including surface, mesh, and contour lines. The presentation is made in the form of solved examples showing the exact MATLAB commands used and the output. At the end of the article, there are about eleven unsolved exercises for students to practice. The solutions to all the exercises are also provided. This article is taken form the bestselling book “MATLAB for Beginners: A Gentle Approach.”