Spring 2004ENGR 111A1 MATLAB – Palm Chapter 3, Part 2 Function Files Class 6.1 Chapter 3: Section 2.

Slides:



Advertisements
Similar presentations
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Advertisements

BIO 130: Anatomy and Physiology I Spring 2013 Dr. Rebecca Pearson Please sign in!
Fall 2004ENGR 111A MatLab – Palm Chapter 4, Part 2 The if and switch structure Class 10.1 Sections: 4.4 and 4.6.
5/2/05lecture161 REVIEW OF WHERE WE ARE Literature review project: 2 nd draft is due on Wednesday. Bring ONE printed copy to class. We will exchange, read,
ITC242 – Introduction to Data Communications ITC431 – Computer Networks Week 13 Exam Preparation.
Class 9.1 Chapter 4 Sections: 4.1, 4.2, 4.3
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
Engineering H193 - Team Project Gateway Engineering Education Coalition P. 1 Spring Quarter 2007 Progress Reports Week 4 Day 1.
ENGR 111A - Spring MatLab – Palm Chapter 4, Part 4 Review and Debugging Class 12.1: Palm Chapters &
Today’s quiz on 8.2 A Graphing Worksheet 1 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
Course Introduction (Lecture #1) ENGR 107 – Intro to Engineering The slides included herein were taken from the materials accompanying Engineering Fundamentals.
Today’s quiz on 8.2 B Graphing Worksheet 2 will be given at the end of class. You will have 12 minutes to complete this quiz, which will consist of one.
1 Session-13 CSIT 121 Spring 2006 Test-1 is on March 9 th ; Demo-5 due date extended to March 7 Test-1 is on March 9 th ; Demo-5 due date extended to.
CIS101 Introduction to Computing Week 12 Spring 2004.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 18. You will have 10 minutes for today’s quiz. The second problem.
Ma 109 College Algebra Section 001 Fall 2005 Dr. Carl Eberhart, Professor of Mathematics
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 4.1/4.2. IMPORTANT NOTE: If you have time left after you finish this quiz,
Today: 1. Hand back/review Test Lecture on Section 5. 1, with HW 5
Make sure you know the day and time of the final exam for this section of Math 110: Day: ______ Date:______ Time: ______ to _______ All Math 110 finals.
Monday, October 24 th 3 rd & 6 th Please have 2 sharpened pencils, your formula notecards, and your math notebook and folder. NO new Math Minutes this.
Please close your laptops and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily homework quiz will be given.
Next class session: Test 1 on all sections covered from Chapters 1 and 2 Remember: If you haven’t yet passed the Gateway Quiz, you need to review your.
Coming up in Math 110: Today: Section 8.2 (Quadratic formula)
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Please open Daily Quiz 34. A scientific calculator may be used on this quiz. You can keep your yellow formula sheets out when you take the quiz. Remember.
MATH 310, FALL 2003 (Combinatorial Problem Solving) MoWeFr 1:20 McGregory 214.
ENGR-25_MTExam_Logisitics.pptx 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
For Loops 2 ENGR 1181 MATLAB 9. For Loops and Looped Programming in Real Life As first introduced last lecture, looping within programs has long been.
Functions 1 ENGR 1181 MATLAB 14.
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
1 My Experiences as Faculty Member and Researcher Dr. Kalim Qureshi.
1 Midterm Review. 2 Midterm Exam  30% of your grade for the course  October14 at the regular class time  No makeup exam or alternate times  Closed.
MATLAB FUNDAMENTALS: MATRIX/ARRAY FUNCTIONS THE COLON MATRIX/ARRAY MANIPULATION INPUT/OUTPUT HP 100 – MATLAB Wednesday, 9/3/2014
Astronomy 114 Lab Section 211, Professor Weigel. Outline for Today About Goals for this class Attendance Syllabus Safety Star Project Apparent vs. Absolute.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
Functions CS 103 March 3, Review A function is a set of code we can execute on command to perform a specific task A function is a set of code we.
Functions CS 103. Review A function is a set of code we can execute on command to perform a specific task When we call a function, we can pass arguments.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
Agenda Review C++ Library Functions Review User Input Making your own functions Exam #1 Next Week Reading: Chapter 3.
Introduction to Engineering MATLAB – 2 Introduction to MATLAB - 2 Agenda Defining Variables MATLAB Windows.
Wednesday, April 8, 2015PHYS , Spring 2015 Dr. Jaehoon Yu 1 PHYS 3313 – Section 001 Lecture #18 Wednesday, April 8, 2015 Dr. Jaehoon Yu Expectation.
BIO 132: Anatomy and Physiology II Fall 2015 Dr. Rebecca Pearson Please sign in!
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
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.
Getting Started with MATLAB (part2) 1. Basic Data manipulation 2. Basic Data Understanding 1. The Binary System 2. The ASCII Table 3. Creating Good Variables.
CS Class 08 Today  Exercises  Nested loops  for statement  Built-in functions Announcements  Homework #3, group solution to in-class.
1 Final Review. 2 Final Exam  30% of your grade for the course  December 9 at 7:00 p.m., the regular class time  No makeup exam or alternate times.
Welcome to CS 101! Introduction to Computing I. Greeting! Kiho Lim CS 101 – Teaching Assistant
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
1 Lecture 4 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
REMINDER: If you haven’t yet passed the Gateway Quiz, make sure you take it this week! (You can find more practice quizzes online in the Gateway Info menu.
ENG College of Engineering Engineering Education Innovation Center 1 Functions 1 in MATLAB Topics Covered: 1.Uses of Functions Organizational Tool.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
We’ll be spending a few minutes talking about Quiz 2 on Sections that you’ll be taking the next class session, before you work on Practice Quiz.
ENG College of Engineering Engineering Education Innovation Center 1 Functions 2 in MATLAB Topics Covered: 1.Functions in Script Files Inline Functions.
IST 210: ORGANIZATION OF DATA Introduction IST210 1.
Structured Computer Programming EE 201 Introduction to MATLAB 7 for Engineers بسم الله الرحمن الرحيم King Abdulaziz University College of Engineering Dept.
Starter To complement our notes and learning from last lesson (Topic 10 Introducing Large ICT Systems: Features of Large ICT Systems), fold your piece.
REMINDER: If you haven’t yet passed the Gateway Quiz, make sure you take it this week! (You can find more practice quizzes online in the Gateway Info menu.
Welcome to CS 1340! Computing for scientists.
MatLab – Palm Chapter 5 Curve Fitting
Problem Solving Lab – Part C
Class 9.1 Chapter 4 Sections: 4.1, 4.2, 4.3
MatLab – Palm Chapter 4, Part 2 The if and switch structure
MatLab – Palm Chapter 4, Part 2 The if and switch structure
Programming Control Structures with JavaScript Part 2
Cornell Notes Note-taking strategy that will
CMSC201 Computer Science I for Majors Final Exam Information
Administrative Issues
Announcements DS-203 Fall 2008.
Presentation transcript:

Spring 2004ENGR 111A1 MATLAB – Palm Chapter 3, Part 2 Function Files Class 6.1 Chapter 3: Section 2

Spring 2004ENGR 111A2 EXAM 1 Wednesday, October 6 th, from 6:30 to 8:00 pm. Bright 124. No Makeup for Unexcused Absence! Covers material through both lectures last week (through lecture 5.2) Study power point presentations and homework assignments

Spring 2004ENGR 111A3 RAT 6.1 Take out a piece of paper, write your name, team#, today’s date and RAT 6.1. You are going to have to write a function file on paper. In the interest of time, you do not have to include any comments. For your homework, however, comments are REQUIRED!

Spring 2004ENGR 111A4 RAT 6.1 (Continued) In 2-minutes, Individually, write a function file to compute the area of a square given the dimension of a side. You will receive BONUS points if the function also outputs the perimeter. Test your algorithm using hand calculations for a square with side dimension of 4. Within 30-seconds submit your papers to your GANT or Peer Teacher. Solution Diary File for RAT 6.1 SolutionDiary File for RAT 6.1

Spring 2004ENGR 111A5 Learning Objectives Students should be able to: Create user-defined functions (script) *.m files and run them from the command window. Know how to declare and use global variables. Know how to use the commands fzero(), fminbnd() & fiminsearch() with user- defined functions.

Spring 2004ENGR 111A6 3.5 User Defined Functions User Defined Functions are a special kind of Script File defined by its syntax. function [output] = function_name(input) function_name MUST be the same as the file name. Make everything including the file name lower case. Good examples are in the table on p Hint: make the names short and lowercase.

Spring 2004ENGR 111A7 3.5 Continued Take a few minutes to study the table and the text on p. 151 Pay attention to the “;” and the output names. Work the example at top of p DO NOT SUBMIT FOR GRADING. Sample Function File Diary File

Spring 2004ENGR 111A8 Local & Global Variables Local variables defined inside the function are local to that file. That makes functions “portable” from one program to another. Global variable can “be seen” by all parts of the program. CAREFULLY study pp

Spring 2004ENGR 111A9 In-Class Assignment 6.1 Work Example (p. 154) during the next 15-minutes. Remember to include good comments! You may be asked to demonstrate that your file will actually run. Solution (diary file).M Function File Ideal.M Function File vd_Waals

Spring 2004ENGR 111A10 Applications of User Defined- Functions Find the Zeros of a Function Spend 3-minutes studying fzero() on p.156.M Function File Diary File.M Function FileDiary File Minimizing a Function of One Variable Spend 3-minutes studying fminbnd() on p M Function File Diary File.M Function FileDiary File Minimizing a Function with Several Variables Spend 3-minutes studying fminsearch() on p M Function File Diary File.M Function FileDiary File Table (p.160) contains the minimizing and root finding functions

Spring 2004ENGR 111A11 Example & T3.2-1, 2 & 3 Take 5 minutes to study Example 3.2-2, p TYU T3.2-1, 2 & 3 ( p. 162) for credit; submit as part of Assignment 6.1. Submit your.M files for your function and your.M file with your diary..M Function File for Diary File for M Function File for Diary File for M Function File for Diary File for 3.2-3

Spring 2004ENGR 111A12 Assessment Take out a sheet of paper and Individually, write a briefly description of the MatLab topic that is the “muddiest” to you so far this semester. Then, as a team and agree on a topic you would like for GANT/Peer Teacher to cover in help sessions. Write this on a sheet of paper along with your Team # and give this paper to either of them as you leave.

Spring 2004ENGR 111A13 Assignment 6.1 INDIVIDUAL ASSIGNMENT Due: One week from today. Chapter 3: #8, 11, 12 & 14