The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by lbozcu, 2019-01-05 02:30:10

MATLAB NOTE

MATLAB NOTE

USING STATE SPACE TRANSFORM

CONTINUED…

TEST

TO IDENTIFY THE LEVEL OF UNDERSTANDING

PROBLEM:- BY CONSIDERING NONLINEAR DAMPING

FORMATTING PLOTS
(Used for comparing and Interpreting
Theoretical and Experimental Results)

A plot can be formatted to have a required appearance.

With formatting you can:

 Add title to the plot.
 Add labels to axes.
 Change range of the axes.
 Add legend.
 Add text blocks.
 Add grid.

FORMATTING PLOTS

There are two methods to format a plot:

1. Formatting commands.
In this method commands, that make changes or additions to the
plot, are entered after the plot() command. This can be done in
the Command Window, or as part of a program in a script file.

2. Formatting the plot interactively in the Figure Window.
In this method the plot is formatted by clicking on the plot and
using the menu to make changes or add details.

FORMATTING COMMANDS

title(‘string’)

Adds the string as a title at the top of the plot.

xlabel(‘string’)
Adds the string as a label to the x-axis.

ylabel(‘string’)
Adds the string as a label to the y-axis.

axis([xmin xmax ymin ymax])
Sets the minimum and maximum limits of the x- and y-axes.

FORMATTING COMMANDS

legend(‘string1’,’string2’,’string3’)

Creates a legend using the strings to label various curves (when
several curves are in one plot). The location of the legend is
specified by the mouse.

text(x,y,’string’)

Places the string (text) on the plot at coordinate x,y relative to the
plot axes.

gtext(‘string’)

Places the string (text) on the plot. When the command executes
the figure window pops and the text location is clicked with the
mouse.

EXAMPLE PROGRAM

clc; Light Intensity as a Function of Distance
clear all;
x=[10:0.1:22]; 1200
Theory
Experiment

1000

y=95000./x.^2; INTENSITY (lux) 800
xd=[10:2:22]; Comparison between theory and experiment.

yd=[950 640 460 340 250 180 140]; 600

plot(x,y,'-','LineWidth',1.0) 400
hold on

plot(xd,yd,'ro--','linewidth',1.0,'markersize',102)00

hold off 0
xlabel('DISTANCE (cm)') 8 10 12 14 16 18 20 22 24
ylabel('INTENSITY (lux)') DISTANCE (cm)

title('\fontname{Arial}Light Intensity as a Function of Distance','FontSize',14)

axis([8 24 0 1200])

text(14,700,'Comparison between theory and
experiment.','EdgeColor','r','LineWidth',2)

legend('Theory','Experiment',0)

OPEN WEB RESOURCES

 Mathworks Information
 Mathworks: http://www.mathworks.com
 Mathworks Central: http://www.mathworks.com/matlabcentral
 http://www.mathworks.com/applications/controldesign/
 http://www.mathworks.com/academia/student_center/tutorials/launchpad.

html

 Matlab Demonstrations
 http://www.mathworks.com/cmspro/online/4843/req.html?13616
 http://www.mathworks.com/cmspro/online/7589/req.html?16880
 Select Help-Demos in Matlab
 Matlab/Simulink student Select “Help” in Matlab on extensive help about

Matlab, Simulink and toolboxes
 http://www.mathworks.com/academia/student_center/homework/
 http://www.mathworks.com/academia/student_center

 Other Matlab and Simulink Books
 Mastering Matlab 6, Hanselman & Littlefield, Prentice Hall
 Mastering Simulink 4, Dabney & Harman, Prentice Hall
 Matlab and Simulink Student Version Release 14

OPEN WEB RESOURCES

www.mathworks.com/
www.mathtools.net/MATLAB
www.math.utah.edu/lab/ms/matlab/matlab.html
www.mit.edu/afs/athena.mit.edu/software/matlab/
www.utexas.edu/its/rc/tutorials/matlab/
www.math.ufl.edu/help/matlab-tutorial/
www.indiana.edu/~statmath/math/matlab/links.html
www.eng.cam.ac.uk/help/tpl/programs/matlab.html

OPEN WEB RESOURCES

Messner and Tilbury, “Controls Tutorial for MATLAB and SIMULINK: A Web-based
approach,” Prentice-Hall, 1999.
 Sigmon and Davis, MATLAB Primer, 6th Edition, CRC Press, 2001
 Gockenback, “A Practical Introduction to MATLAB,” 2nd Edition, CRC Press, 2005.
 http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html
 http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/
 http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/getstart.pdf
 http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/using_ml.pdf
 http://www.mathworks.com/access/helpdesk/help/toolbox/control/control.shtml
 http://www.mathworks.com/academia/student_version/
 http://www.mathworks.com/academia/student_version/companion.html
http://travis.eng.man.ac.uk/barry/control2/lab/SIMULINK.htm
http://matlab.kimhua.co.kr/digest/dec98/nonlinear.html

OPEN WEB RESOURCES

 http://www.scsolutions.com/feedback.html

 http://www.math.mtu.edu/~msgocken/intro/intro.html

 http://www-personal.engin.umich.edu/~tilbury/tutorials/matlab_tutorial.html
http://www.eng.fsu.edu/~cockburn/matlab/matlab_help.html
http://www.engin.umich.edu/group/ctm/working/mac/simulink_basics/
http://www.messiah.edu/acdept/depthome/engineer/Resources/tutorial/matlab/simu.html
http://rclsgi.eng.ohio-state.edu/courses/me780/handouts/simulink.pdf
http://www.mae.ncsu.edu/homepages/buckner/simulink2.pdf
http://www.tutorgig.com/showurls.jsp?group=896&index=0
http://www.rpi.edu/dept/chem-eng/WWW/faculty/bequette/lou/simtut/simtut_html.html
http://www.math.siu.edu/matlab/tutorials.html

OPEN WEB RESOURCES

http://wolfman.eos.uoguelph.ca/~jzelek/matlab/ctms/
http://www.engin.umich.edu/group/ctm/
http://www.me.cmu.edu/matlab/html/
http://www.math.utah.edu/lab/ms/matlab/matlab.html
http://www.indiana.edu/~statmath/math/matlab/
http://spicerack.sr.unh.edu/~mathadm/tutorial/software/matlab/
http://www.math.ufl.edu/help/matlab-tutorial/matlab-tutorial.html
http://www.cs.ubc.ca/spider/cavers/MatlabGuide/guide.html
 http://www.class.umd.edu/enme/403/0101/t1.html

 http://www.math.mtu.edu/~msgocken/intro/intro.html

 http://www.engin.umich.edu/group/ctm

THANK YOU…

Any Questions ?


Click to View FlipBook Version