MATLAB Comparing Graphs

Basic Commands

Cell Mode

Default Desktop

Integration - Numeric
Integration - Symbolic

Matrix Operations
and Linear Algebra

Plotting

Programming

Regression - Polynomial

Vector Operations

Sometimes you may want to see a side-by-side comparison of two graphs. This can be done using the subplot command.

[x,y]=meshgrid(-1:.1:1,-1:.1:1);
subplot(1,2,1)
surf(x,y,x.^2+y.^2)
axis square
subplot(1,2,2)
contourf(x,y,x.^2+y.^2)
axis square

comparing graphs


 

 

 

Ohlone College home page
Please contact bbradshaw@ohlone.edu
with your questions, comments, and suggestions.
Terms and Conditions of Use & Disclaimer.
Copyright © 2006 Ohlone College. All rights reserved.