Review Make sure current directory is set properly Create a diary

Slides:



Advertisements
Similar presentations
Engr 0012 (04-1) LecNotes Engr 0012 (04-1) LecNotes Functional analysis y = f(x) things to do 1. sketch graph 2. find roots (zeros) 3. find.
Advertisements

Division Example 2x - 3y + 4z = 10 x + 6y - 3z = 4 -5x + y + 2z = 3 A*X = B where A = B = >> X = A\B X =
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect FXP. 1Winter Quarter Course Wrap Up and.
ME457 Mechatronic System Modeling MICHIGAN STATE UNIVERSITY Matlab® refresher Your objective: to dominate! My objective: to help you dominate!
Introduction to MATLAB ENGR 1187 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
Lecture 1: Introduction Lecture series based on the text: Essential MATLAB for Engineers and Scientists By Hahn & Valentine
M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files called M- files. M-files are.
INTRO TO PROGRAMMING Chapter 2. M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files.
MATLAB File Management. MATLAB User File Management Matlab provides a group of commands to manage user files. For more information, type help iofun. pwd.
Functions 1 ENGR 1181 MATLAB 14.
ENGR 1320 Final Review - Programming Major Topics: – Functions and Scripts – Vector and Matrix Operations in Matlab Dot product Cross product – Plotting.
Introduction to Engineering MATLAB – 6 Script Files - 1 Agenda Script files.
Matlab Workshop 1/10/07 Lesson 1: Matlab as a graphing calculator.
Introduction to Matlab Module #2 Page 1 Introduction to Matlab Module #2 – Arrays Topics 1.Numeric arrays (creation, addressing, sizes) 2.Element-by-Element.
Synthesis ENGR 1181 MATLAB 11. Topics  No new material  Covers topics that will be on the Midterm 2 Exam MATLAB 01 – Program Design MATLAB 02 – Introduction.
What does C store? >>A = [1 2 3] >>B = [1 1] >>[C,D]=meshgrid(A,B) c) a) d) b)
Engr 0012 (04-1) LecNotes script/function comparison scriptsfunctions Show program logic answer “what” questions Show program details answer “how”
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Covenant College November 27, Laura Broussard, Ph.D. Professor COS 131: Computing for Engineers Chapter 5: Functions.
ENG College of Engineering Engineering Education Innovation Center 1 More Script Files in MATLAB Script File I/O : Chapter 4 1.Global Variables.
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
Introduction to Engineering MATLAB – 7 Script Files - 2 Agenda Script files continued.
ENG 1181 College of Engineering Engineering Education Innovation Center P. 1 MAT - Conditional Statements Topics Covered: 1. if based conditional statements.
Lecture 26: Reusable Methods: Enviable Sloth. Creating Function M-files User defined functions are stored as M- files To use them, they must be in the.
Engr 0012 (04-1) LecNotes script organization General organization for scripts 1. Header 3. Constant definitions 4. Input data/independent variable/parameter.
Files: By the end of this class you should be able to: Prepare for EXAM 1. create an ASCII file describe the nature of an ASCII text Use and describe string.
ENG 1181 College of Engineering Engineering Education Innovation Center 1 Script File Input – Output : Chapter 4 PLEASE HAVE STUDENTS START MATLAB NOW.
Engr 0012 (04-1) LecNotes Engineering 0012 Introduction to Engineering Computing Dr. Patzer B68D Benedum Hall Office:
1 Lecture 4 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Engr 0012 (04-1) LecNotes loading data from files >> file_name = input( 'Enter data file name ==> ','s') Enter data file name ==> c:\temp\speed_mpg.dat.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
Engr 0012 (04-1) LecNotes Engr 0012 (04-1) LecNotes Contrasting MATLAB with C MATLABC language Workspace - interactive computation No real.
Insert your name and class period here. 1. What is the goal of every equation you solve? 2. How do we accomplish this goal? Type your answer here.
INTRODUCTION TO PROGRAMMING Chapter 2. M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in.
Physics 114: Lecture 1 Overview of Class Intro to MATLAB
MATLAB – More Script Files
EEE 161 Applied Electromagnetics
Release Numbers MATLAB is updated regularly
BAHASA PEMROGRAMAN MATLAB as an Engineering Tool & Programming Language a lecture note for Civil Engineering students of PETRA Christian University Doddy.
L2. Basics Variables and Expressions Assignment Statements
Computer Parts - Computer Components Project
Basic operations in Matlab
Changing WRF input files (met_em…) with MATLAB
Problem Solving An engineer wants to use a diesel engine to run a pump that pumps 18,000 gallons of water per hour into a tank that is 65 feet above the.
Lecture 1: Introduction
working toward a script that will help analyze data
Matlab review Matlab is a numerical analysis system
MATLAB (Lecture 2) BY:MAHA ALMOUSA.
Writing functions in MATLAB
conversion factor functions
Plotting Data with MATLAB
getting a choice from the user
MatLab – Palm Chapter 4, Part 2 The if and switch structure
Introduction to Matlab
Multiplication Grids.
MatLab – Palm Chapter 4, Part 2 The if and switch structure
Python 19 Mr. Husch.
Note on Indexing of Array Elements
Islamic University of Gaza
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Using Script Files and Managing Data
Getting Started with Scratch
Computer printout for Example 14.2.
Your objective: to dominate! My objective: to help you dominate!
Python 19 Mr. Husch.
Week 7: Computer Tools for Problem Solving and Critical Thinking
MATLAB (Lecture 2) BY:MAHA ALMOUSA.
Computer Simulation Lab
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
ME 123 Computer Applications I Lecture 7: Basic Functions 3/20/03
Presentation transcript:

Review Make sure current directory is set properly Create a diary » diary test.txt Create a vector » vec1 = [2 4 6] Create another vector » vec2 = [0.5 0.5 0.5] Multiply term by term » vec3 = vec1*vec2 » vec3 = vec1.*vec2 Close diary » diary off Engr 0012 (04-1) LecNotes 03-01

Scripts MATLAB scripts (m-files) are programs Useful whenever a calculation or computation is done repeatedly Provide power that makes MATLAB more useful than a handheld calculator Engr 0012 (04-1) LecNotes 03-02

Script Organization 1. Header (comment) section that identifies purpose of script and information about creator(s) of script 2. Variable dictionary 3. (Optional) format command 4. Display header information to screen (disp commands) 5. Input section (input commands) 6. Computation section 7. Display results section (disp or fprintf commands) Engr 0012 (04-1) LecNotes 03-03

Script Creation 1. Edit diary file that has successfully solved problem 2. From scratch using program design methodology - more common Engr 0012 (04-1) LecNotes 03-04

Class Activities 1. Workshop 04 - Workspace management 2. Workshop 05 - Intro to Scripts Turn in at start of next class (Monday 8 September) MATLAB Workshop 05: Exercise 3. paper copy of script and screen printout of script working with h = 12.3 cm Engr 0012 (04-1) LecNotes 03-05