Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 2.

Slides:



Advertisements
Similar presentations
Introduction to Excel Chapter 2 Excel Fundamentals Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Flow Charts, Loop Structures
ALGORITHMS THIRD YEAR BANHA UNIVERSITY FACULTY OF COMPUTERS AND INFORMATIC Lecture two Dr. Hamdy M. Mousa.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
MATLAB Presented By: Nathalie Tacconi Presented By: Nathalie Tacconi Originally Prepared By: Sheridan Saint-Michel Originally Prepared By: Sheridan Saint-Michel.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Modeling, Computers, and Error Analysis.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 4 Programming and Software EXCEL and MathCAD.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Chapter 2: Input, Processing, and Output
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 3 Programming and Software.
Chapter 2: Developing a Program Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved.
Chapter 1 Program Design
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Problem Solving Chapter 2. What is an algorithm? n A solution to a problem that is: –Precise –Effective –Terminating.
Chapter 3 Planning Your Solution
Linear Simultaneous Equations
BPC.1 Basic Programming Concepts
Spreadsheet in excel Spreadsheet in Excel Uses of spreadsheet
Matrix Mathematics in MATLAB and Excel
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Image Slides.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Introduction to Engineering Computing GEEN 1300 Lecture 7 15 June 2010 Review for midterm.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 MATLAB Programming Chapter 2.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 6 Value- Returning Functions and Modules.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
Numerical Methods in Scientific Computation Lecture 2 Programming and Software Introduction to error analysis Numerical Methods, Lecture 2 1 Prof. Jinbo.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University 1 Chapter 1 Mathematical.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
Lecture 2 Numerical Methods for Engineering MECN 3500 Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus Dr.
1 Programming with MATLAB ผศ. ดร. อนันต์ ผลเพิ่ม Anan Phonphoem
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination.
Cs413_design04.ppt Design and Software Development Design : to create a functional interface that has high usability Development : an organized approach.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 1 Computing Tools Analytic and Algorithmic Solutions Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapter 24 Boundary Value Problems.
Working with Arrays in MATLAB
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
1 Program Planning and Design Important stages before actual program is written.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
Newton’s Method, Root Finding with MATLAB and Excel
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2012.
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
Chapter 2 Excel Fundamentals Logical IF (Decision) Statements Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 13 Transportation Demand Analysis. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Algorithms and Flowcharts
1-1 Logic and Syntax A computer program is a solution to a problem.
Algorithm Algorithm is a step-by-step procedure or formula or set of instruction for solving a problem Its written in English language or natural language.
Introduction to Computer Programming
Unit# 9: Computer Program Development
Software Development Process
Computer Programming LAB 1 Tejalal Choudhary Asst. Prof, CSE Dept.
Use of Mathematics using Technology (Maltlab)
MSIS 655 Advanced Business Applications Programming
Working with Arrays in MATLAB
BUS-221 Quantitative Methods
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
Presentation transcript:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 2

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2 Programming and Software Chapter 2 Objective is how to use the computer as a tool to obtain numerical solutions to a given engineering model. There are two ways in using computers: –Use available software –Or, write computer programs to extend the capabilities of available software, such as Excel and Matlab. Engineers should not be tool limited, it is important that they should be able to do both!

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3 Computer programs are set of instructions that direct the computer to perform a certain task. To be able to perform engineering-oriented numerical calculations, you should be familiar with the following programming topics: –Simple information representation (constants, variables, and type declaration) –Advanced information representation (data structure, arrays, and records) –Mathematical formulas (assignment, priority rules, and intrinsic functions) –Input/Output –Logical representation (sequence, selection, and repetition) –Modular programming (functions and subroutines) We will focus the last two topics, assuming that you have some prior exposure to programming.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 Structured Programming Structured programming is a set of rules that prescribe god style habits for programmer. –An organized, well structured code –Easily sharable –Easy to debug and test –Requires shorter time to develop, test, and update The key idea is that any numerical algorithm can be composed of using the three fundamental structures: –Sequence, selection, and repetition

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5 Fig. 2.1

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6 Sequence. Computer code must be implemented one instruction at a time, unless you instruct otherwise. The structure can be expressed as a flowchart or pseudocode. Fig.2.2

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 Selection. Splits the program’s flow into branches based on outcome of a logical condition. Fig. 2.3

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8 Repetition. A means to implement instructions repeatedly. Fig. 2.4

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9 Fig. 2.5

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Figure 2.6

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11 Modular Programming The computer programs can be divided into subprograms, or modules, that can be developed and tested separately. Modules should be as independent and self contained as possible. Advantages to modular design are: –It is easier to understand the underlying logic of smaller modules –They are easier to debug and test –Facilitate program maintenance and modification –Allow you to maintain your own library of modules for later use

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 Fig. 2.7

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 13 EXCEL Is a spreadsheet that allow the user to enter and perform calculations on rows and columns of data. When any value on the sheet is changed, entire calculation is updated, therefore, spreadsheets are ideal for “what if?” sorts of analysis. Excel has some built in numerical capabilities including equation solving, curve fitting and optimization. It also includes VBA as a macro language that can be used to implement numerical calculations. It has several visualization tools, such as graphs and three dimensional plots.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 14 Fig. 2.8

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 15 MATLAB Is a flagship software which was originally developed as a matrix laboratory. A variety of numerical functions, symbolic computations, and visualization tools have been added to the matrix manipulations. MATLAB is closely related to programming.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 16 Fig. 2.9

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 17 Other Languages and Libraries Fortran 90 (IMSL) C++