O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.7. Specialized Two-Dimensional Plots

Besides drawing plots using plot command, there are many specialized graphics functions in MATLAB for 2-D plotting. Some of the specialized 2-D plot functions are discussed in the following section.

6.7.1. Logarithmic Plot Function

These are further classified as

  1. semilogx: It plots with logarithmically spaced x-axis.

  2. semilogy: It plots with logarithmically spaced y-axis.

  3. loglog: It plots with both the axes logarithmically spaced.

6.7.1.1. semilogx

In semilogx command, the x-axis is drawn on logarithmic scale and y-axis on linear scale. The syntax is

semilogx(x,y)

where

x is the vector of x-variables, and

y is the vector of y-variables.

Example 6.14.

Plot function x= e-a, y = a2 where 0<=a<=10, using

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required