ENG004 ALGORITHMS & INT. TO PROGRAMMING Week 3 “An introduction to arrays and matrices” Ahmet Anıl Dindar 07.03.2007.

Slides:



Advertisements
Similar presentations
MathCAD Data.
Advertisements

Determinant The numerical value of a square array of numbers that can be used to solve systems of equations with matrices. Second-Order Determinant (of.
R for Macroecology Aarhus University, Spring 2011.
MATLAB – A Computational Methods By Rohit Khokher Department of Computer Science, Sharda University, Greater Noida, India MATLAB – A Computational Methods.
Introduction to MATLAB The language of Technical Computing.
Introduction to Matlab Workshop Matthew Johnson, Economics October 17, /13/20151.
Lecture 4.
Maths for Computer Graphics
Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
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 Definition, size, and terminology Construction methods Addressing and sub-arrays Some useful functions for arrays Character arrays.
MECH300H Introduction to Finite Element Methods Lecture 2 Review.
Dr. Jie Zou PHY Welcome to PHY 3320 Computational Methods in Physics and Engineering.
Module 6 Matrices & Applications Chapter 26 Matrices and Applications I.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 MATLAB 基礎. 2 MATLAB  Workspace: environment (address space) where all variables reside  After carrying out a calculation, MATLAB assigns the result.
Data processing in MathCAD. Data in tables Tables are analogous to matrices Tables are analogous to matrices The numbers of columns and rows can be dynamically.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Matlab tutorial course Lesson 2: Arrays and data types
Martin Ellison University of Warwick and CEPR Bank of England, December 2005 Introduction to MATLAB.
Introduction to MATLAB Session 1 Prepared By: Dina El Kholy Ahmed Dalal Statistics Course – Biomedical Department -year 3.
MATLAB Tutorials Session I Introduction to MATLAB Rajeev Madazhy Dept of Mechanical Engineering LSU.
Math 15 Lecture 7 University of California, Merced Scilab A “Very” Short Introduction.
Review of Matrices Or A Fast Introduction.
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
ENG004 ALGORITHMS & INT. TO PROGRAMMING Week 2 “Exploring MATLAB” Ahmet Anıl Dindar
Eng Ship Structures 1 Introduction to Matlab.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 2.
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Introduction to MATLAB 7 Engineering 161 Engineering Practices II Joe Mixsell Spring 2010.
Chapter 4 Review: Manipulating Matrices Introduction to MATLAB 7 Engineering 161.
MAE 1202: AEROSPACE PRACTICUM An Introduction to MATLAB: Part 2 Mechanical and Aerospace Engineering Department Florida Institute of Technology Developed.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
Class Opener:. Identifying Matrices Student Check:
4.4 Identify and Inverse Matrices Algebra 2. Learning Target I can find and use inverse matrix.
ENG College of Engineering Engineering Education Innovation Center 1 Array Accessing and Strings in MATLAB Topics Covered: 1.Array addressing. 2.
Chapter 6 Review: User Defined Functions Introduction to MATLAB 7 Engineering 161.
Working with Arrays in MATLAB
PH24010 Data Handling and Statistics Use of MathCAD to handle statistical data Data storage in vectors and matrices MathCAD’s built-in functions: –Mean,
Introduction to MATLAB 7 MATLAB Programming for Engineer Hassan Migdadi Spring 2013.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
1 Lecture 1 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
>> x = [ ]; y = 2*x y = Arrays x and y are one dimensional arrays called vectors. In MATLAB all variables are arrays. They allow functions.
MATLAB – PT1 The purpose of this workshop is to get you started and to have fun with MATLAB! Let’s talk a little and decide on what we will be covering.
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.
EGR 115 Introduction to Computing for Engineers MATLAB Basics 1: Variables & Arrays Wednesday 03 Sept 2014 EGR 115 Introduction to Computing for Engineers.
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
Array Accessing and Strings ENGR 1187 MATLAB 3. Today's Topics  Array Addressing (indexing)  Vector Addressing (indexing)  Matrix Addressing (indexing)
R Workshop #2 Basic Data Analysis. What we did last week: Understand the basics of how R works Generated objects (vectors, matrices, etc.) Read in data.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Matrix Multiplication The Introduction. Look at the matrix sizes.
Table of Contents Matrices - Definition and Notation A matrix is a rectangular array of numbers. Consider the following matrix: Matrix B has 3 rows and.
ENG004 ALGORITHMS & INT. TO PROGRAMMING Week 4 “Arrays and Matrix Operations III” Ahmet Anıl Dindar
“Moh’d Sami” AshhabSummer 2008University of Jordan MATLAB By (Mohammed Sami) Ashhab University of Jordan Summer 2008.
(4-2) Adding and Subtracting Matrices Objectives: To Add and subtract Matrices To solve certain Matrix equations.
MTH108 Business Math I Lecture 20.
ECE 1304 Introduction to Electrical and Computer Engineering
Computer Application in Engineering Design
Signals in Matlab Matlab as a name stands for Matrix Laboratory.
EGR 115 Introduction to Computing for Engineers
Solving Systems Using Matrices
MATH 493 Introduction to MATLAB
Use of Mathematics using Technology (Maltlab)
ME 123 Computer Applications I Lecture 24: Character Strings 4/18/03
Communication and Coding Theory Lab(CS491)
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
ME 123 Computer Applications I Lecture 25: MATLAB Overview 4/28/03
Presentation transcript:

ENG004 ALGORITHMS & INT. TO PROGRAMMING Week 3 “An introduction to arrays and matrices” Ahmet Anıl Dindar

ENG The class facts address: Class web page:

ENG Last week What is Algorithm and Programming? Why do we need programs? A powerful tool- MATLAB What is MATLAB? Why MATLAB? How to use it? The first commands in MATLAB.

ENG This week Variables  Defining a new variable  Assigning a value to a variable  Variable types An introduction to arrays and matrices  Entering arrays and matrices  Creating arrays and matrices manually by entering values.  Generating arrays and matrices by defining certain rules Generating arrays and matrices by defining certain rules  Creating arrays from existing arrays  By using built-in matrix generators

ENG Variables What is variable? Homer Simpson Are there anyone whose name is Homer Simpson? (probably) YES

ENG Variables: Variable is a tag given to a specific matrice, number or anything. You can change the content of the variable any time. You can name a variable with alphabetic or alpha- numeric. The variables are important in programming. A good sense and logic is essential to follow the codes.

ENG And now let’s see How it is in MATLAB! Follow me now!

ENG >> a=1 a = 1 >> a=1 a = 1 >> a+a ans = 2 Variables in MATLAB (Alphabetic): >> a=1 a = 1 >> a+a ans = 2 >> a*a ans = 1

ENG >> a1=10 a1 = 10 >> a1=10 a1 = 10 >> a1 a1 = 10 Variables in MATLAB (Alphanumeric): >> a1=10 a1 = 10 >> a1 a1 = 10 >> a1*(2*a1)/5 ans = 40

ENG >> a=10 a = 10 >> a1=5 a1 = 5 >> a+a1 ans = 15 >> a+a1*(a-a1) ans = 35 >> Variables in MATLAB:

ENG An introduction to arrays and matrices What is matrice? What is array? What are the matrices we use? What are the calculations? The properties of the matrices? The matrices named with variables?

ENG Creating a Matrice >> a=[1 3 4] a = >> a1 = Row Matrix (Vector) Column Matrix (Vector)

ENG Creating a Matrice >> ali=[1 2 3;4 5 6;7 8 9] ali = An Ordinary Matrice

ENG Generating arrays and matrices by defining certain rules: >> a=(1:10) a = Columns 1 through Columns 8 through Generic Creation (one by one): >> deli=(1:2:10) deli = >> Generic Creation (two by two): >> deli=(10:-2:0) deli = Generic Creation (???):

ENG Generating arrays and matrices by defining certain rules: >> ones(1,10) ans = >> zeros(1,5) ans = Some Special Matrices What about a matrice with full of 2’s >> twos(1,5)

ENG Generating arrays and matrices by defining certain rules: >> ones(1,10) ans = >> zeros(1,5) ans = Some Special Matrices What about a matrice with full of 2’s >> twos(1,5)

ENG Creating matrices from matrices >> a=(1:5) a = >> b=(2:6) b = >> c=[a;b] c = Using matrices to create new matrices

ENG Assignment There is not any assignment!

ENG Next week... WeeksDateClassAssignment Introduction to the classRegistration Exploring MATLABAssignment Arrays and Matrix Operations N.A Arrays and Matrix Operations Assignment Arrays and Matrix OperationsAssignment Polynomials and curve-fitting Assignment Descriptive statistics Assignment Programming Elements of MATLAB N.A Programming Elements of MATLAB Assignment Programming Elements of MATLAB Assignment Plotting and Animations N.A Plotting and Animations Assignment Numerical Integration Assignment Symbolic Math Assignment Take-home final projectN.A.

ENG See you next week!

ENG