General Computer Science for Engineers CISC 106 Lecture 23 Dr. John Cavazos Computer and Information Sciences 4/15/2009.

Slides:



Advertisements
Similar presentations
COMP 116: Introduction to Scientific Programming Lecture 37: Final Review.
Advertisements

CMPS 1371 Introduction to Computing for Engineers STRUCTURE ARRAYS.
Maths for Computer Graphics
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
General Computer Science for Engineers CISC 106 Lecture 28 Dr. John Cavazos Computer and Information Sciences 04/29/2009.
General Computer Science for Engineers CISC 106 Lecture 32 Dr. John Cavazos Computer and Information Sciences 05/08/2009.
General Computer Science for Engineers CISC 106 Lecture 19 Dr. John Cavazos Computer and Information Sciences 04/06/2009.
General Computer Science for Engineers CISC 106 Lecture 22 Dr. John Cavazos Computer and Information Sciences 04/13/2009.
General Computer Science for Engineers CISC 106 Lecture 04 Roger Craig Computer and Information Sciences 9/11/2009.
CIS 101: Computer Programming and Problem Solving Lecture 2 Usman Roshan Department of Computer Science NJIT.
General Computer Science for Engineers CISC 106 Lecture 20 Dr. John Cavazos Computer and Information Sciences 04/08/2009.
General Computer Science for Engineers CISC 106 Final Exam Review Dr. John Cavazos Computer and Information Sciences 05/18/2009.
General Computer Science for Engineers CISC 106 Lecture 31 Dr. John Cavazos Computer and Information Sciences 05/06/2009.
General Computer Science for Engineers CISC 106 Lecture 08 Dr. John Cavazos Computer and Information Sciences 2/27/2009.
General Computer Science for Engineers CISC 106 Lecture 08
General Computer Science for Engineers CISC 106 Lecture 25 Dr. John Cavazos Computer and Information Sciences 04/20/2009.
General Computer Science for Engineers CISC 106 Lecture 34 Dr. John Cavazos Computer and Information Sciences 05/13/2009.
General Computer Science for Engineers CISC 106 Lecture 30 Dr. John Cavazos Computer and Information Sciences 05/04/2009.
Dr. Jie Zou PHY Chapter 3 Solution of Simultaneous Linear Algebraic Equations: Lecture (III) Note: Besides the main textbook, also see Ref: Applied.
General Computer Science for Engineers CISC 106 Lecture 33 Dr. John Cavazos Computer and Information Sciences 05/11/2009.
General Computer Science for Engineers CISC 106 Lecture 05 Dr. John Cavazos Computer and Information Sciences 2/20/2009.
General Computer Science for Engineers CISC 106 Lecture 26 Dr. John Cavazos Computer and Information Sciences 04/24/2009.
General Computer Science for Engineers CISC 106 James Atlas Computer and Information Sciences 10/26/2009.
Matlab Intro. Outline Matlab introduction Matlab elements Types Variables Matrices.
General Computer Science for Engineers CISC 106 Lecture 08 James Atlas Computer and Information Sciences 9/21/2009.
General Computer Science for Engineers CISC 106 Lecture 18 Dr. John Cavazos Computer and Information Sciences 3/27/2009.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Multivariate Linear Systems and Row Operations.
COMP 116: Introduction to Scientific Programming Lecture 7: Matrices and Linear Systems.
ECON 1150 Matrix Operations Special Matrices
Matrix Algebra. Quick Review Quick Review Solutions.
General Computer Science for Engineers CISC 106 Lecture 07 James Atlas Computer and Information Sciences 06/29/2009.
Chapter 8 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
Copyright © 2011 Pearson, Inc. 7.2 Matrix Algebra.
Lecture 28: Mathematical Insight and Engineering.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
General Computer Science for Engineers CISC 106 Lecture 04 Dr. John Cavazos Computer and Information Sciences 09/10/2010.
Two dimensional arrays in Java Computer Science 3 Gerb Objective: Use matrices in Java.
Chapter 9 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Determinants and Cramer’s Rule.
Lesson 3-5: Solving Equations with the Variable on Each Side.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Matrices Matrices A matrix (say MAY-trix) is a rectan- gular array of objects (usually numbers). An m  n (“m by n”) matrix has exactly m horizontal.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 2/13/2009.
Discrete Mathematics 1 Kemal Akkaya DISCRETE MATHEMATICS Lecture 16 Dr. Kemal Akkaya Department of Computer Science.
Programming with Spread Sheets Lecture 18: Supporting Material Dr Kathryn Merrick Tuesday 19 th May, 2009.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Chapter 6 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Matrix Operations and Their Applications.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
General Computer Science for Engineers CISC 106 Lecture 2^4 Roger Craig Computer and Information Sciences 03/23/2009.
General Computer Science for Engineers CISC 106 Lecture 13 - Midterm Review James Atlas Computer and Information Sciences 10/02/2009.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
General Computer Science for Engineers CISC 106 Lecture 15 Dr. John Cavazos Computer and Information Sciences 03/16/2009.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
General Computer Science for Engineers CISC 106 Lecture 06 James Atlas Computer and Information Sciences 06/24/2009.
13/10/2016CS150 Introduction to Computer Science 1 Multidimensional Arrays  Arrays can have more than one column  Two dimensional arrays have two columns.
General Computer Science for Engineers CISC 106 Lecture 27 Dr. John Cavazos Computer and Information Sciences 04/27/2009.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
General Computer Science for Engineers CISC 106 Lecture 09 Dr. John Cavazos Computer and Information Sciences 03/04/2009.
The Department of Engineering Science The University of Auckland Welcome to ENGGEN 131 Engineering Computation and Software Development Lecture 2 Debugging,
General Computer Science for Engineers CISC 106 Lecture 10 James Atlas Computer and Information Sciences 07/15/2009.
MTH108 Business Math I Lecture 20.
CSE 504 Discrete Mathematics & Foundations of Computer Science
Properties and Applications of Matrices
Hierarchy of Data in a Database
Matlab Intro.
General Computer Science for Engineers CISC 106 Lecture 15
Matlab Intro.
Presentation transcript:

General Computer Science for Engineers CISC 106 Lecture 23 Dr. John Cavazos Computer and Information Sciences 4/15/2009

Lecture Overview The : operator (pgs ) Struct arrays (pgs )

How to use the : operator A(:,j) returns the jth column of A For example A(:,2) A =

How to use the : operator A(i,:) returns the ith row of A For example: A(3,:) A =

How to use the : operator A( a:b) gives the a th - b th elements of A >> A = [1 2 3; 4 5 6; 7 8 9] A = A(3:6) →

How to use the : operator A(c:end) gives all of the elements of A from the c th element to the end >> A = [1 2 3; 4 5 6; 7 8 9] A = A(5:end) →

What is a Struct Array? A struct array is a way to store one or more structs of related information An array of structs can be thought of as a database

Struct Array Syntax There are multiple ways to create a struct array: s = struct('field1', {}, 'field2', {},...) creates an empty structure with fields field1, field2,... s = struct creates a structure with no fields. s = struct([]) creates an empty structure with no fields.

Struct Array Example s = struct('fish',{{'flipper','swimmie'}},'age',{[4], [7]}) s = fish: {'flipper' 'swimmie'} age: [4 7] s(1) ans= fish: 'flipper' age: 4

Problem Solving Steps (Part I) On a piece of paper: Write the problem, in your own words, in English. Write a solution for the problem in English in your own words Write pseudocode or a flowchart of your solution

Problem Solving Steps (Part II) Write test values and a test script for your function Write the first draft of your function Now, in Matlab, type in your test script and function Test your function and debug