M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and...
-
Upload
joy-fields -
Category
Documents
-
view
218 -
download
0
description
Transcript of M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and...
![Page 1: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/1.jpg)
MATLAB – What Is It ?
Name is from matrix laboratory Powerful tool for
– Computation and visualization of engineering and science mathematics
– Communication of ideas– Programming:
Built-in editor, debugger, and help Many predefined functions (grouped in toolboxes) Interpreted or compiled programs
![Page 2: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/2.jpg)
MATLAB – Where Is It ?
MATLAB is available on all computers in the Engineering Computer Center and on many other computers located in departments within the College of Engineering (Computer Classroom 225 Wales). You can also purchase your own Student Version from MathWorks at: http://www.mathworks.com/academia/student_version/?BB=1
![Page 3: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/3.jpg)
How Do We Want To Use MATLABIn Dynamics Course?
Write a Simple MATLAB Program to Do the Following:- Calculate Velocities of Sample Problem 15.3
- Make Plots of vD and ωBD vs θ in Two Different Windows
- Mark Graphs to Indicate Text Solution Values and where ωBD = 0.
![Page 4: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/4.jpg)
Creating Your Own ProgramScript (m-file) Concept
M-file is a collection of MATLAB commands – Can be re-executed – Is easily changed/modified or e-mailed to someone
File format: Name.m Commands are executed one by one sequentially
– File is executed by typing its name (without .m)– Results appear in the command window (or use ; )
Can be created using any text editor, but is most easily developed in MATLAB Editor Window
![Page 5: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/5.jpg)
Boot Up Default MATLAB Window
Help menu provides answers to most questions
Opens Editor Window to create new program
In this window: - type & edit commands- test & run program- save work when finished
![Page 6: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/6.jpg)
Demo MATLAB CodeCalculate & Plot Equation: y=2x+30x2-2x3
Dot needed for element-by-element operation
![Page 7: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/7.jpg)
Plotting Line Specifiers
Line Specifiers Change the LookEspecially Handy When Plotting Several Lines on Same GraphUse Help Menu to Find Out More
![Page 8: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/8.jpg)
0 20 40 60 80 100 120 140 160 1800
100
200
300
400
500
600
700
Crank Angle, (Radians)
Vel
ocity
of P
oint
D (i
n/s)
Velocity of Point D vs SAMPLE PROBLEM 15.3 Prof Sadd
The Project Problem
Labels & Titles
Use text to write to screen; text(x,y,’. . . ’)
Mark Text Solution
θ
vD = ?ωBD = ?
![Page 9: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/9.jpg)
Text Solution
![Page 10: M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.](https://reader036.fdocuments.in/reader036/viewer/2022062504/5a4d1b247f8b9ab05999672a/html5/thumbnails/10.jpg)
Good Luck!