Lecture2 - Comp 1200 Matlab Announcements Final Exam Lab 1...

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Comp 1200 Matlab 1/17/07 Announcements Final Exam April 30, 2007 Lab 1 is due January 19 11:55pm Lab 2 will be posted next Monday Vector Variables Variables are the name associated to a group of boxes so to speak MyVector = 12 -3 5 56 -7 11 MyVector = [12, -3, 5, 56, -7, 11] You can leave off the commas Short cut MyVector = 1:75 So a vector can have one value up to Variable Indexing Vectors have index numbers associated to each box MyVector = 12 -3 1 2 5 56 -7 11 3 4 5 6 MyVector(3) has the value 5 What if I want to add the first two TheAnswer = MyVector(1) + MyVector(2) M-Files Two types of M-Files Script M-Files a list of commands Function M-Files actually has a name associated with it and you can send and receive data from it. Can use any Text Editor that can save in ASCII text. MATLAB has editor edit Have to use the .m extension M-Files Run/Executing/Editing Must be saved in "current directory" To run the program type in name of file but not .m Will not show up in command window To edit type in edit file name or just double click on the file icon. Save and run again if you don't save then Matlab doesn't acknowledge any changes. But don't pack up yet! Let's look at WebCT Again ...
View Full Document

{[ snackBarMessage ]}

Page1 / 7

Lecture2 - Comp 1200 Matlab Announcements Final Exam Lab 1...

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

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