logo for matrixlab-examples.com
[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines


Home
Welcome Matrixmania Blog
-> Sitemap / Search <-
-> Books <-
Forums and Help
Contact
Basics Quick Matlab Guide
Matlab Tutorial
Matlab Examples
Matlab Flow Control
Boolean Logic
Plots and GUI Matlab 2D Plots
Matlab 3D Plots
Matlab GUI
Applications Calculus
Linear Algebra
Matlab Cookbook I
Matlab Cookbook II
Electrical Calculations
Probability and Stats
Finance Apps
Other Relevant Links
Notes on Computing
Online Calculators
Fun!
Your own Website?
Terms/Policies
leftimage for matrixlab-examples.com

loglog - logarithmic plot


In this example we are going to demonstrate how to use the 'loglog' function included in Matlab to produce non-linear plots.

This term referrs to the fact that the plot is logarithmically scaled in both axes. There are other functions such as 'semilogx' and 'semilogy' which have one axis in linear scale and the other axis in logarithmic scale.
 


Example of a logarithmic graphic:

clear; clc; close all 

% Define your independent variable
t = 0 : 2*pi/360 : 2*pi; 

% Define values along your x-axis
x = exp(t);
% Define values along your y-axis
y = 50 + exp(3*t); 

% Plot your function with a wider line and grid the figure
loglog(x, y, 'LineWidth', 2)
grid 

% Use a title for the figure
title('Demonstration of logarithmic plots') 

% Label your x-axis with a double line.
% Note the special characters

xlabel([{'e^{t}'}; {'0 \leq t \leq 2\pi'}]) 

% Label your y-axis
ylabel('50 + e^{3t}')



The produced figure is:

logarithmically scaled plot, produced with the Matlab function 'loglog'


 From 'loglog' to home

 From 'loglog' to '2D Plot Menu'
 
Top

Table of Contents

2D summary

3D summary




footer for loglog page