Project Teams Project on Diffusion will be a TEAM project. 34 Students in class so 6 teams of 5 and one Team of 4. Determine members of team and a team.

Slides:



Advertisements
Similar presentations
2.3 Modeling Real World Data with Matrices
Advertisements

Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Lecture 4.
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 3.
Maths for Computer Graphics
Arrays Revisited Selim Aksoy Bilkent University Department of Computer Engineering
Lecture 4 Sept 8 Complete Chapter 3 exercises Chapter 4.
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
CIS 101: Computer Programming and Problem Solving Lecture 2 Usman Roshan Department of Computer Science NJIT.
EGR 106 – Week 2 – Arrays Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
EGR 106 – Week 2 – Arrays & Scripts Brief review of last week Arrays: – Concept – Construction – Addressing Scripts and the editor Audio arrays Textbook.
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Concatenation MATLAB lets you construct a new vector by concatenating other vectors: – A = [B C D... X Y Z] where the individual items in the brackets.
Lecture 2 MATLAB fundamentals Variables, Naming Rules, Arrays (numbers, scalars, vectors, matrices), Arithmetical Operations, Defining and manipulating.
EGR 106 – Week 3 – More on Arrays Brief review of last week Additional ideas: – Special arrays – Changing an array – Some array operators – Character arrays.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Part 1 Chapter 2 MATLAB Fundamentals
MATLAB Fundamentals.
1 Introduction to MATLAB MATLAB is all of the following: 1.Computational environment 2.Plotting software 3.Programming language Typical applications: 1.Calculations.
Sundermeyer MAR 550 Spring Laboratory in Oceanography: Data and Methods MAR550, Spring 2013 Miles A. Sundermeyer Linear Algebra & Calculus Review.
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,
Matlab Chapter 2: Array and Matrix Operations. What is a vector? In Matlab, it is a single row (horizontal) or column (vertical) of numbers or characters.
Review of Matrices Or A Fast Introduction.
1 Week 3: Vectors and Matrices (Part III) READING: 2.2 – 2.4 EECS Introduction to Computing for the Physical Sciences.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
Arrays 1 Multiple values per variable. Why arrays? Can you collect one value from the user? How about two? Twenty? Two hundred? How about… I need to collect.
Learner’s Guide to MATLAB® Chapter 2 : Working with Arrays.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
Unit 3: Matrices.
Matrix Arithmetic. A matrix M is an array of cell entries (m row,column ) and it must have rectangular dimensions (Rows x Columns). Example: 3x x.
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
>> x = [ ]; y = 2*x y = Arrays x and y are one dimensional arrays called vectors. In MATLAB all variables are arrays. They allow functions.
Chapter 2 Creating Arrays Legend: MATLAB command or syntax : Blue MATLAB command OUTPUT : LIGHT BLUE.
Part 1 Chapter 2 MATLAB Fundamentals PowerPoints organized by Dr. Michael R. Gustafson II, Duke University and Prof. Steve Chapra, Tufts University All.
(The Transpose Operator) 1 >> C=[ ; ; ] C = >> D=C' D =
Array Operations ENGR 1181 MATLAB 4.
Basic Matrix Operations Matrix – a rectangular array of numbers, variables, and both Order (dimensions) – describes the number of rows and columns in a.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
3.4 Solution by Matrices. What is a Matrix? matrix A matrix is a rectangular array of numbers.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
CMPS 1371 Introduction to Computing for Engineers VECTORS.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
ENG College of Engineering Engineering Education Innovation Center 1 Array Operations in MATLAB 1.Types of Matrix arithmetic 2.Dot operators Mathematical.
CS100A, Fall 1998, Lecture 201 CS100A, Fall 1998 Lecture 20, Tuesday Nov 10 More Matlab Concepts: plotting (cont.) 2-D arrays Control structures: while,
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
To add, subtract, multiply, and divide, absolutely follow the mathematical rules. 1. All the rules 2. The element-per-element operator 3. Ex1: graphing.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
LAB 2 Vectors and Matrices Dr.Abdel Fattah FARES.
MTH108 Business Math I Lecture 20.
Chapter 3 Arrays and Vectors
Introduction to Programming for Mechanical Engineers (ME 319)
Matrix Operations SpringSemester 2017.
Warm-up a. Solve for k: 13 −5
Introduction to MATLAB [Vectors and Matrices] Lab 2
Unit 3: Matrices
Matlab Training Session 2: Matrix Operations and Relational Operators
Arrays in Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
EECS Introduction to Computing for the Physical Sciences
Matrix Operations SpringSemester 2017.
Presentation transcript:

Project Teams Project on Diffusion will be a TEAM project. 34 Students in class so 6 teams of 5 and one Team of 4. Determine members of team and a team name to identify yourselves. Provide team names and members Tuesday Before spring break, March 11.

Quiz on Thursday in Kirk 212 Everything up to todays class will be on the quiz.

Review of Last Week The fundamental data unit in Matlab – Rectangular collection of data – All variables are considered to be arrays Data values organized into rows and columns

Size of an array Construction: – Brute force using brackets – Concatenation of other arrays – L/R and U/D – The colon operator Addressing: – Individual elements – Subarrays

Special Arrays Special predefined arrays: – all zeroszeros(R,C)zeros(N) – all onesones(R,C)ones(N) – zeros with ones on the diagonal eye(R,C)eye(N) – random numbers (within [ 0 1 ]) rand(R,C)rand(N) Square versions

random on [ 0, 1 ]

Linspace – like the colon operator, but definitely gets the last number on the list linspace ( start, last, number of values) – examples: linspace(0,10,6) [ ] linspace(0,1,4)[ ] – default for number is 100 linspace(0,10) [ … 10 ] Note increment for 100 points, 99 intervals

Changing an Array Recall reading an array value:

To change a single value in an array – Use addressing on the left hand side of =

Can also be used to change a sub-array Note – array on the right needs to be of the correct size !!!

Wrong number of elements for the assignment Wrong dimensions for assignment Watch for addressing errors:

Other useful methods that do work: Assigning values with too large an index just grows the array

Scalars work for sub- array replacement – they just scale up to the right size

Size – the number of rows and columns Length – the larger of these two Array answer Scalar answer

Diag – matrix vector operator for diagonal elements

Reshape – resize fixed set of elements Note – the set of elements is exactly the same Note column- wise approach to re-ordering the values

Element by Element Math Operations For arrays of identical sizes, addition is defined term by term: – the command F = A + B means F(r,c) = A(r,c) + B(r,c) – for all row and column pairs r,c “element-by-element” addition

For example: Notes: – Arrays must be of identical sizes – One can be a scalar (it is “sized up”) – Subtraction is identical

The other basic math operations work element by element using the dot notation (with A,B the same sizes): – multiplication F = A.* B  F(r,c) = A(r,c) * B(r,c) – division F = A./ B  F(r,c) = A(r,c) / B(r,c) – exponentiation: F = A.^ B  F(r,c) = A(r,c) ^ B(r,c) note periods!

For example:

One could be scalar: a = [ ] b = 2

Built-in functions also work element-by- element: – log and exp – trigonometric – etc.