Matlab Workshop Getting Started.

Slides:



Advertisements
Similar presentations
Chapter 1 Discovery 1 Evaluate each expression, and compare the results obtained in the left column with the corresponding results in the right column.
Advertisements

Introduction to Matlab. I use Matlab for: Data analysis Data plotting Image Analysis Also – Simulations (solving odes/pdes/finite element methods) – Minimisations,
MATLAB Basics CS 111 Introduction to Computing in Engineering and Science.
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 3 – More on Arrays Brief review of last week Additional ideas: – Special arrays – Changing an array – Some array operators – Character arrays.
Chapter 1 Number Sense See page 8 for the vocabulary and key concepts of this chapter.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (2): MATLAB Environment (Chapter 1)
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
Math 15 Lecture 7 University of California, Merced Scilab A “Very” Short Introduction.
1 Lab of COMP 406 Teaching Assistant: Pei-Yuan Zhou Contact: Lab 1: 12 Sep., 2014 Introduction of Matlab (I)
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
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.
1 Yangon Technological University Department of Mechanical Engineering Computer Application In Mechanical Engineering I ME Dr. Yin Yin Tun Deputy.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Class Opener:. Identifying Matrices Student Check:
ME6104: CAD. Module 4. ME6104: CAD. Module 4. Systems Realization Laboratory Module 4 Matlab ME 6104 – Fundamentals of Computer-Aided Design.
Unit 3 Vocab By Blake L.. Algebraic expression In mathematics, an algebraic expression is an expression built up from constants, variables, and a finite.
MA/CS 375 Fall 2002 Lecture 3. Example 2 A is a matrix with 3 rows and 2 columns.
Getting Started with MATLAB (part 3) 1. Algebra, 2. Trig 3. The keyword ans 4. Clean up and suppress output: finalizing the software’s presentation 1.
CS 170 – INTRO TO SCIENTIFIC AND ENGINEERING PROGRAMMING.
MATLAB Lecture Two Tuesday 5 July Chapter 3.
8.2 Operations With Matrices
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
INTRODUCTION TO MATLAB Dr. Hugh Blanton ENTC 4347.
MA/CS 375 Fall 2002 Lecture 2. Motivation for Suffering All This Math and Stuff Try the Actor demo from
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Matrix Multiplication The Introduction. Look at the matrix sizes.
Matlab Tutorial Iman Moazzen First Session – September 11, 2013.
(a) To use the formulae sin (A B), cos (A B) and tan (A B). (b) To derive and use the double angle formulae (c) To derive and use the half angle formulae.
Goals for today Learn to create, combine, and index arrays Learn to multiply arrays in MATLAB Use matrix multiplication to simulate a real-world problem.
Matlab It’s good. Variables Doubles (numbers) String (text) Cell: a 1x1 size space containing another variable, of any size, inside it Structure (struct):
ECE 1304 Introduction to Electrical and Computer Engineering
WARM-UP Write in Scientific Form Write in Standard Form
Systems of Equations Lesson 41: Solve by using a matrix
Arithmetic & other operations
Other Kinds of Arrays Chapter 11
Other Kinds of Arrays Chapter 11
Solving Systems Using Matrices
Ying shen School of software engineering tongji university
INTRODUCTION TO BASIC MATLAB
MATLAB DENC 2533 ECADD LAB 9.
Matlab Workshop 9/22/2018.
Algebra Year 10, 2016 Day 1.
Algebra Algebra.
WarmUp 2-3 on your calculator or on paper..
6.1 Right Triangle Trigonometry
GRAPHING CALCULATOR Part 2
MATH 493 Introduction to MATLAB
Which of the following sums cannot be simplified?
Use of Mathematics using Technology (Maltlab)
Matlab tutorial course
Lecture 2 Introduction to MATLAB
Introduction to MATLAB [Vectors and Matrices] Lab 2
Arrays and Matrices in MATLAB
Introduction to Matlab
INTRODUCTION TO MATLAB
Multidimensional array
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.
Experiment No. (1) - an introduction to MATLAB
7.1 Roots and Rational Exponents
Beginning Python Programming
CS 111 Introduction to Computing in Engineering and Science
Multiplication of Matrices
A square matrix is a matrix with the same number of columns as rows.
Arrays in Matlab UC Berkeley Fall 2004, E Copyright 2005, Andy Packard
Matlab Basics Tutorial
Introduction to Matlab: Element by Element Operations
Matrix Operations Ms. Olifer.
Numerical Expression A numerical expression is a string of numbers and operational signs that names a number.
Introduction to Matrices
Presentation transcript:

Matlab Workshop Getting Started

Command Window Editor

Matlab As A Really Fancy Calculator In the command window enter the following: 1+2

Matlab As A Really Fancy Calculator In the command window enter the following: 1+2

Addition In the command window enter the following: 1+2+3

Subtraction In the command window enter the following: 5-3

Multiplication In the command window enter the following: 4*6

Division In the command window enter the following: 15/3

Exponents In the command window enter the following: 2^3

Brackets In the command window enter the following: Now try: 1+2*3 (1+2)*3 Evaluated first Evaluated first

Matrices In the command window enter the following: [1 2; 3 4]

Matrix Multiplication In the command window enter the following: [1 2; 3 4]*[2 1; 3 4]

Pointwise Multiplication In the command window enter the following: [1 2; 3 4].*[2 1; 3 4] “Point-wise multiplication”

Matrix Division In the command window enter the following: [1 2; 3 4]/[2 1; 3 4]

Point-wise Matrix Division In the command window enter the following: [3 8; 15 24]./[3 4; 5 6] “Point-wise division”

Trigonometry In the command window enter the following: sin(1.57) cos(1.047)

Trigonometry In the command window enter the following: tan(0.7854)

Trigonometry In the command window enter the following: asin(0.4794) acos(0.8776) atan(0.2553)

Variable Assignment In the command window enter the following: This creates a variable called “a” and assigns it a value of 2.

Variable Assignment Q: Why did it say a = 2 after I hit enter? A: Because if you don’t end the line with “;” then Matlab prints out the result of your operation.

Suppressing Output b = 3;

Suppressing Output b = 3; No extra output!

Let’s make another variable c = 5;

Now We Can Do Math With Our Variables In the command window enter the following: a+b b*c a+b*c

Variable Types a = 2; b = 2.75; Integer Rational Number

Variable Types c = ‘z’; d = ‘hello’; Character String

Variable Types e = [2 3]; f = {3,2}; Array Cell Array

Variable Types h = [2 1; 3 4]; Matrix

Variable Types g.Name = 'Me'; g.Age = 28; Structure Array

Indexing Each variable type has a particular indexing syntax: h(2,1) % Matrices are indexed by row and then column a(1) % Integers are special cases of matrices b(1) % So are rational numbers c(1) % So are characters d(2) % So are strings e(2) % So are arrays f{2} % Cells are indexed using curly braces g.Name % Struct arrays are indexed using the "." notation

Indexing Each variable type has a particular indexing syntax: h(2,1) % Matrices are indexed by row and then column a(1) % Integers are special cases of matrices b(1) % So are rational numbers c(1) % So are characters d(2) % So are strings e(2) % So are arrays f{2} % Cells are indexed using curly braces g.Name % Struct arrays are indexed using the "." notation

Math With Variables a+b a-b a*b a/b sin(a) cos(a) tan(a) log(a) exp(a) h*h h.*h h/h