Getting Started with Matlab: Are My Plots Still Ugly?

Below we present some function curves or surface plots drawn using Matlab. Since the public account cannot process EPS images, the images we screenshot are all bitmap, so you will see the ‘jagged edges’. To appreciate high-quality images with smooth edges and no jaggedness when zoomed in, please click on “Read the Original (Extraction Code: dsqb)” to preview the high-definition PDF document. (Reply in the public account: mtbltx to receive the PDF document and all example source code)

  1. Images drawn using <span>plot</span> and <span>fplot</span> in the upper and lower windows respectively.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Image of the parameter equation.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Image of the parameter equation.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Image of the polar coordinate equation.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Image of the polar coordinate equation.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Multiple polar coordinate equations in multiple windows.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Image of the surface.

Getting Started with Matlab: Are My Plots Still Ugly?

Matlab Plotting and LaTeX Typesetting

Plotting is certainly for usage. How to generate EPS format images with Matlab and insert them into a LaTeX document?

  1. Draw the image with Matlab and click to open the Figure window.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. Click “ File Save as”.

Getting Started with Matlab: Are My Plots Still Ugly?

  1. In the pop-up dialog, select “EPS file” and confirm.

Next, I will explain how to insert the generated EPS image file into the TeX source file:

First, save the EPS format image in the same path as the TeX source file.

Then, at the place in the text where you want to insert the image, use the command \includegraphics to insert the image.

For example, to insert the image here, you can use the following command:

\begin{verbatim}
\begin{figure}[H]
  \centering
 \includegraphics[width=\textwidth]{sinx4T}
  \caption{$y= sin x$\ 4 periods of the image}\label{sinx4t}
\end{figure}
\end{verbatim}
To save space, the images shown in this article omit the code. If you need the source code and watermark-free PDF file, please follow the method below to receive them. Mastering these 9 examples in the article will allow you to apply them to similar function plotting problems.

Long press to recognize the QR code below, reply in the public account:mtlbltx to receive!

Getting Started with Matlab: Are My Plots Still Ugly?

Long press to recognize the QR code and reply:003, to receive videos and e-books.

Long press the QR code above, reply:003, receive 2.5G Matlab videos + beginner to advanced e-book!

References

[1] Charles F. Van Loan, K. V. Daisy Fan, Insight Through Computing.

[2] Zhang Zhiyong, Mastering MATLAB R2011A.

Previous Recommendations
.Getting Started with Matlab: 010 Universal Formula for Matlab Plotting
.Getting Started with Matlab: 009 Two-Dimensional Plotting: After reading this article, you will be able to draw all elementary function graphs!
.Getting Started with Matlab: 008 Two-Dimensional Plotting: A comprehensive explanation of the plot usage.
.Getting Started with Matlab: 007 Programming Example (Part 2): Calculating the approximate value of pi.
.Getting Started with Matlab: 007 Programming Example (Part 1): Calculating the approximate value of pi.
.Getting Started with Matlab: 006 Programming Example: Calculating the approximate value of e.
.Getting Started with Matlab: 005 Programming Example: Finding the extreme value of a quadratic function on a closed interval.
.Getting Started with Matlab: 004 Programming Example: The problem of Earth’s surface area growth.
.Getting Started with Matlab: 003 Basic Knowledge.
.Advanced Matlab Tutorial: Extracting brightness from black and white photos to create color maps.
.Getting Started with Matlab: 002 Long-term investment compound interest problem.
.Getting Started with Matlab: 001 Sphere Volume Problem.
.Installation Tutorial: MATLAB 2016b~2018b Installation Tutorial.

Getting Started with Matlab: Are My Plots Still Ugly?

Getting Started with Matlab: Are My Plots Still Ugly?

Welcome to “like”, “view” and leave a message! Your support is our motivation to persist!

Leave a Comment