Introduction to Engineering MATLAB – 7 Script Files - 2 Agenda Script files continued.

Slides:



Advertisements
Similar presentations
Introduction to Engineering MATLAB – 11 Plotting - 4 Agenda Multiple curves Multiple plot.
Advertisements

EXAMPLE 5 Model continuously compounded interest A = Pe rt SOLUTION Finance You deposit $4000 in an account that pays 6% annual interest compounded continuously.
Introduction to Engineering MATLAB - 12 Agenda Function files.
Lecture 5 Review Programming Program Structures Comparison Repetition: looping or iteration Conditional execution: branching Bubble Sort.
Contemporry Engineering Economics, 4 th edition, © 2007 Equivalence Calculations with Continuous Payments Lecture No.12 Chapter 4 Contemporary Engineering.
Interest Formulas for Single Cash Flows
General Computer Science for Engineers CISC 106 Lecture 04 Roger Craig Computer and Information Sciences 9/11/2009.
MICROSOFT – WORD. WORD... text entry f formatting spell check bulleting numbering t tables and much more.
THE MATLAB ENVIRONMENT VARIABLES BASIC COMMANDS HELP HP 100 – MATLAB Wednesday, 8/27/2014
Compound Interest SWBAT compute compound interest using a table.
6-7 Change each percent to a decimal. 1.4% 2.9%3.2.0% 4.6.5% % % COURSE 2 LESSON 9-7 (For help, go to Lessons 6-2.) Simple and Compound Interest.
1 Press Ctrl-A ©G Dear2010 – Not to be sold/Free to use Compound Interest Stage 6 - Year 11 Applied Mathematic (Preliminary General 1)
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
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.
Introduction to Matlab Module #2 Page 1 Introduction to Matlab Module #2 – Arrays Topics 1.Numeric arrays (creation, addressing, sizes) 2.Element-by-Element.
Introduction to Engineering MATLAB – 2 Introduction to MATLAB - 2 Agenda Defining Variables MATLAB Windows.
MATLAB Environment ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Chapters 2 & 3 MATLAB Skills This tutorial revisits Examples 3.1 to 3.4 to show how MATLAB can be used to solve the same problems 1.Scatter Plots 2.Other.
ENG College of Engineering Engineering Education Innovation Center 1 More Script Files in MATLAB Script File I/O : Chapter 4 1.Global Variables.
7-7 Simple and Compound Interest. Definitions Left side Principal Interest Interest rate Simple interest Right side When you first deposit money Money.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Computer Simulation Lab Electrical and Computer Engineering Department SUNY – New Paltz SUNY-New Paltz “Lecture 2”
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Introduction to Engineering MATLAB - 13 Agenda Conditional statements  If – end  If – else – end  if – elseif – else - end.
ENG 1181 College of Engineering Engineering Education Innovation Center P. 1 MAT - Conditional Statements Topics Covered: 1. if based conditional statements.
ENG 1181 First-Year Engineering Program College of Engineering Engineering Education Innovation Center First-Year Engineering Program MAT - Introduction.
EGR 115 Introduction to Computing for Engineers Designing The Battleship Game in MATLAB Monday 22 Sept 2014 EGR 115 Introduction to Computing for Engineers.
ENG 1181 College of Engineering Engineering Education Innovation Center 1 Script File Input – Output : Chapter 4 PLEASE HAVE STUDENTS START MATLAB NOW.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 6: Debugging in MATLAB Monday 15 Sept 2014 EGR 115 Introduction to Computing for Engineers.
Introduction to Engineering MATLAB – 4 Arrays Agenda Creating arrays of numbers  Vectors: 1-D Arrays  Arrays: 2-D Arrays Array Addressing Strings & String.
1 Lecture 4 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
1 Lecture 5 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Using the Power Property with Exponential Models to Make Predictions
M ATLAB – What Is It ? Name is from matrix laboratory Powerful tool for – Computation and visualization of engineering and science mathematics – Communication.
Spring 2016 Statics - TAM 210 & TAM 211 Discussion 1 - Intro to Matlab 1.
Introduction to Engineering Introduction to 2-D CAD Reference – CADKEY Project Book Chapter 3 – Creating Basic 2-D Geometry.
Introduction to Engineering MATLAB – 9 Plotting - 2 Agenda Formatting plots.
Compound & Simple Interest Investment Analysis. You have been given £5000 to invest for 8 years and a number of banks have approached you to offer their.
Homework Quiz. Rule of 72 Interest Rate 8% 12% 6% 2%.03% Years for money to double 9 years years.
Introduction to Programming on MATLAB Ecological Modeling Course Sep 11th, 2006.
BANK RESEARCH MAKE A TABLE WITH THE FOLLOWING INFORMATION.
Copyright © The McGraw-Hill Companies, Inc. This work is only for non-profit use by instructors in courses for which this textbook has been adopted.
Compound Interest. Compound Interest (except continuous) When the bank pays interest on both the principal and the interest an account has already earned,
Equivalence Calculations with Continuous Payments
Equivalence Calculations with Continuous Payments
MATLAB – More Script Files
EGR 115 Introduction to Computing for Engineers
Future Value of an Investment
MATLAB Introduction Dr. Theodore Cleveland University of Houston
Two-Dimensional Plots
LESSON 4-1 Preparing a Chart of Accounts
Simple and Compound Interest
Welcome to the Fundamentals of Mathematics for Engineers Lab
مناهــــج البحث العلمي
Introduction to MATLAB Programming
Lesson 1-4 Preparing a Chart of Accounts
Lesson 1-4 Preparing a Chart of Accounts
Islamic University of Gaza
CSCI N317 Computation for Scientific Applications Unit 1 – 1 MATLAB
Lesson 1-4 Preparing a Chart of Accounts
Using Script Files and Managing Data
Importing Excel Data & Exporting Data to Excel
Example 7 Investment The future value of $3000 invested for 3 years at rate r, compounded annually, is given by What interest rate will give a future value.
ME 123 Computer Applications I Lecture 4: Vectors and Matrices 3/14/03
Computer Simulation Lab
Interest.
ME 123 Computer Applications I Lecture 5: Input and Output 3/17/03
Electrical and Computer Engineering Department SUNY – New Paltz
Presentation transcript:

Introduction to Engineering MATLAB – 7 Script Files - 2 Agenda Script files continued

EXAMPLE Write a script file that determines the balance in a saving account at the end of every year for the first 10 years. Initial investment of $1,000 and interest rate of 6.5% compounded annually. Display the information in a table. For an initial investment of A, and interest rate of r, the balance B after n years is given by:

format bank yr = [1:10]; % Creating a vector of year numbers. balance = 1000*1.065.^yr; % Creating a vector of the balance. table_yr_blnc(:,1)=yr'; % Substituting the yr vector in the first column of the table matrix. table_yr_blnc(:,2)=balance'; % Substituting the balance vector in the second column of the table matrix. disp(' YEAR ACCOUNT') % Display titles. disp(' BALANCE ($)') % Display titles. disp(' ') % Display an empty line. disp(table_yr_blnc) % Display the table. SOLUTION Referenced in first MATLAB lecture

>> Lecture4Example4 YEAR ACCOUNT BALANCE ($) SOLUTION Executing the script file in the command window gives:

ASSIGNMENT 5: 1.Problem 32 page 61 in the textbook. 2.Problem 33 page 61 in the textbook. 3.Problem 4 page 161 in the textbook. For each problem write a script file and execute it in the command window. For each problem, the first two lines of the script file are: % Assignment 5, Problem (write the number of the problem) % Name: (first name, last name) Submit a printout of the script file, and a printout of the command window.