New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Felipe McLaughlin
Felipe McLaughlin
OK State
GPA 4.0

Gary Yen

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Gary Yen
Class Notes
25 ?




Popular in Course

Popular in Mechanical and Aerospace Engineering

This 0 page Class Notes was uploaded by Felipe McLaughlin on Sunday November 1, 2015. The Class Notes belongs to MAE 3723 at Oklahoma State University taught by Gary Yen in Fall. Since its upload, it has received 34 views. For similar materials see /class/232794/mae-3723-oklahoma-state-university in Mechanical and Aerospace Engineering at Oklahoma State University.

Similar to MAE 3723 at OK State

Popular in Mechanical and Aerospace Engineering


Reviews for SYSTEMS I


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/01/15
ECENIMAE 3723 Systems MATLAB Lecture 1 Lecture Overview El Introduction and History El Matlab architecture El Operation basics El Visualization Programming El Other useful information Introduction and History n Invented by Cleve Moler in late 1970s to give students access to LINPACK and EISPACK without having to learn Fortran n Together with Jack Little and Steve Bangert they founded Mathworks in 1984 and created Matlab El The current version is 7 El Interpreted code based system in which the fundamental element is a matrix El Available for a large number of platforms l Windows Linux HP UX Mac OS X and Solaris Architecture El Currently the Matlab core contains a mixture of routines in C and Java El New routines can be obtained by acquiring toolboxes l Control systems signal processing image processing neural networks fuzzy logics among many others El Simulink is one of their major toolboxes Architecture 2 n Simulink is a software package for making modeling and simulation easy and fun It is all based on block diagrams Fiie m View mm mm mi Heiv Di issaaairwzirNmmai vimemi moms Mama may 17mm if if i aaeis Architecture 3 Toolbox SIMULINK Control Systems Operation Basic Interface 52 ml Mew WBh Maw Hiah D m a i n Mquot myynnvmanrl wmmcmszas v J mums Eoncxol syltem mum w 9 u mm mm 7mm 41ng Running mum 4mm m I Workspace Or Launch Pad dumcczb629s P112 gtgt al 2 3 a ww i albax Command History or Current Directory i thutwh 3 1 Lhznuuh 6 Command Window Operations Basics 2 El 4 basic variable types I Double precision matrices I Strings I Cell arrays I Structures El Variable assignment I Single value a 1 7 a 8 IMatrixm 12 43 1 2 4 3 Operations Basics 3 El Using variables in expressions lb s rta10 llO q b 09 El Using functions I Single outputs Ely sqrtx I Multiple outputs II rp k residue numolen Partialfraction expansion Operations Basics 4 II Example function Partialfraction expansion Bs 54 853 1652 9s6 As s36szlls6 6 4 3 s2 53 52 s1 num l 8 l6 9 6 den l 6 ll 6 rpk residuenumden Operations Basics Matrices gtgt v gtgt v39 ans 397 ILLquot rm 1 r r39 quotfx JLv HAW HEN U ms u u Operations Basics Matrices 2 El Matrix multiplication 1 2 3 411 0 0 1 ans 1 2 3 4 El Dot multiplication 1 2 3 41 0 0 1 ans 1 0 0 4 El Dot division Kronecker tensor product kronMN Operations Basics Matrices 3 Other important matrix functions I Inverse invM Rank rankM Determinant detM null matrix M n by m matrix of zeros M zerosnm n by m matrix of ones M onesnm l Identity matrix n by n M eyen Uplotxy Visualization 2 El Add titles to graphs and axis I title this is the title I ylabel y l Xlabel x mmm Visualization 3 El Multiple plots I plotxyl b Xy2 r I legend yl y2 Visualization 4 El Matlab can also do 3D plots such as mesh surfaces I XY meshgrid 222 222 I Z X exp XA2 YA2 I meshXYZ Visualization 5 n Or simple 3D plots IX 2022 ly X IZ X exp XA2 y 2 I I Plot3xyz Visualization 6 El All calls to plot plot3 mesh etc will overwrite on the current figure Make sure that you want to erase the current figure El To create a new empty figure use the command figure Visualization 6 El Adding figures to reports I Print the figure directly I Save it to a TIFF file and add to the report Eile 9 Export I Copy to clipboard and paste to the report Edit 9 Copy Eigure n The background is copied too By default it is gray To change the background color use 39 set gcf color white Programming El Programming in Matlab is done by creating files I File 9 New 9 M File I edit El Programs can be divided into two categories Script programs Functions Programming 2 Script M files I Storing a sequence of functions I All variables are global I Call the program by writing the name of the file where it is saved I 00quot can be used for commenting Programming 3 Functions M files I It has to start declaring the name of the function its inputs and outputs II Eg function a b c fooinl in2 I The file name has to be the same name of the function foom I The variables are local I Call it by calling the function name with inputs and outputs Programming 4 I To create a new script M le Go to FILE gt NEW gt M file I 5 Euanv r L as m Um EgtMrldu 1 27 E E11 E1 22 mm t00130 xexp 1tsin23t nxis0 30 1 1 p1ottx grid y1abe139xt39 x1abe1C39Time sec39 1 r Save file as filenamem To run the file In the Command Window type fiename Programming 5 El Matlab accepts if then else constructs if ltconditiongt ltcommandsgt elseif ltconditiongt ltcommandsgt else ltcommandsgt end Programming 6 El For loops for k ltarraygt ltstatementsgt end The commands are executed repeatedly and the variable k is given each value in the loopvector Programming 7 El Example of using if elseif thenquot and for command arandnl5 for i1lengtha if aigtO sil elseif aiO siO else si l end end gtgta 11909 11892 00376 03273 01746 gtgts 1 l l l l Programming 8 El Other important Control Flow functions I if statement I for statement I while statement I No goto statement I break exists from for and while loops I switch case otherwise end combination I try catch end combination I end is to end control statements above I return is used in functions in the same way as Fortran Other useful information El To run programs they have to be in the current active directory or in a directory in the path Eile 9 Set path El help ltfunction namegt displays the help for the function I If you create function the first things commented after the function declaration are considered the help information El Helpdesk brings up a GUI for browsing very comprehensive help documents Other useful information 2 El save ltfilenamegt saves everything in the workspace or the function variable space to ltfienamegtmat If no ltfienamegt is given saves to matlabmat El load ltfilenamegt loads the file El More information on Matlab software visit httpwwwmathworkscom


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.