EGR_102_Lab_04A_MATLAB_Scripts

EGR_102_Lab_04A_MATLAB_Scripts - MATLAB Script Files EGR...

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

View Full Document Right Arrow Icon
MATLAB ® Script Files EGR 102 - Lab 04A 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Saving Work in MATLAB ® Command Window runs commands and displays results Command History lists previously executed commands How do you save your work? Two types of MATLAB ® files: Scripts Functions Both use a .m extension (sometimes called M-files) EGR 102 - Lab 04A 2
Background image of page 2
Saving Work in MATLAB ® Scripts They automate repetitive tasks They contain a collection of commands that you would execute in the command window Functions They operate on information (inputs) that are fed into them and return values (outputs) to the global workspace Functions have a separate (private) workspace EGR 102 - Lab 04A 3
Background image of page 3

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

View Full DocumentRight Arrow Icon
Current Folder The Current Folder is the folder on your computer to which MATLAB ® will save all files It is also the folder that MATLAB ® will search when it runs a file The Current Folder may be changed interactively using the Current Folder Window or Current Folder Toolbar All engineering students are given personal network space to store files (M: drive) Create a “MATLAB ” folder in your M: drive to save files for this class Change the Current Folder to M:\MATLAB EGR 102 - Lab 04A 4
Background image of page 4
Current Folder The default Current Folder in MATLAB ® is “C:\Temp” It will return to this folder every time you open MATLAB MATLAB will not be able to find any of your saved files in “C:\Temp” Remember to set your Current Folder to “M:\MATLAB” every time you open MATLAB ® EGR 102 - Lab 04A 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

EGR_102_Lab_04A_MATLAB_Scripts - MATLAB Script Files EGR...

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

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