LECTURE_5_CS113_2010 - CS113 Introduction to Computing for...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS113 Introduction to Computing for Engineers Plots and Graphs I
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Background While numerical methods are the heart (and origin) of Matlab, graphics has become the major component since the release of Version 4. Version 6 adds to this legacy with refinements and new functions. Professional Matlab comes with two thick manuals: (a) basic commands & programming and (b) graphics The graphics capabilities are so broadly defined that we will be able to cover only a small part we'll focus on graphics you will find immediately useful we will point to some of the areas where you will find powerful new capabilities when you need them later Like all of us, you will find yourselves frequently looking up "help" or checking the manuals for graphics!
Background image of page 2
3 >> x=0:0.05:10*pi; >> y=exp(-.1.*x).*sin(x); >> plot(x,y) >> xlabel('X axis description') >> ylabel('Y axis description') >> title('Title for plot goes here') >> legend('Legend for graph') >> grid on Basic 2D Plotting The simplest kind of plot is a cartesian plot of (x,y) pairs defined by symbols or connected with lines NOTE #1: Reversing the x,y order (y,x) simply rotates the plot 90 degrees! NOTE #2: line(x,y) is similar to plot(x,y) but does not have additional options
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Supporting Commands Several functions let you control the plot appearance axis(): determines the axis scaling (see help for options) hold on/off: controls whether or not the plot is erased before
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/29/2012 for the course CSC 113 taught by Professor Phillipregali during the Fall '10 term at Catholic University of America.

Page1 / 15

LECTURE_5_CS113_2010 - CS113 Introduction to Computing for...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online