SlideShare una empresa de Scribd logo
1 de 105
Zen and the Art of MatLab Damian Gordon
Hard work done by : ,[object Object],[object Object]
Introduction to MatLab ,[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object]
Printed Circuit Board
Specific Bond Selected
Bond Shape Estimated
MATLAB Command Window To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit www.mathworks.com. » » help HELP topics:
Creating Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Operations + Addition - Subtraction * Multiplication ^ Power  Division /  Division ,[object Object],[object Object],[object Object],[object Object],[object Object]
Creating Complex Numbers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Entering Matrices (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Entering Matrices (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Entering Matrices (3) ,[object Object],[object Object],[object Object],[object Object]
Complex Matrices ,[object Object],[object Object],[object Object],[object Object]
MATLAB Command Window » who Your variables are: a  b  c   » whos Name  Size  Bytes  Class a  8x8  512  double array b  9x9  648  double array c  9x9  648  double array Grand total is 226 elements using 1808 bytes
Matrix Addition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Subtraction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Multiplication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix - Power ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Transpose ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Division ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matrix Operations + Addition - Subtraction * Multiplication ^ Power ‘ Conjugate  Transpose  Left Division / Right Division ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Philosophiae Naturalis  Principia  Matlab ematica Damian Gordon
Getting to Matlab
Magic Matrix ,[object Object],[object Object],[object Object],[object Object]
Identity Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Upper Triangle Matrix » a = ones(5) a = 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 » triu(a) ans = 1  1  1  1  1 0  1  1  1  1 0  0  1  1  1 0  0  0  1  1 0  0  0  0  1
Lower Triangle Matrix » a = ones(5) a = 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 1  1  1  1  1 » tril(a) ans = 1  0  0  0  0 1  1  0  0  0 1  1  1  0  0 1  1  1  1  0 1  1  1  1  1
Hilbert Matrix ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inverse Hilbert Matrix » invhilb(4) ans = 16  -120  240  -140 -120  1200  -2700  1680 240  -2700  6480  -4200 -140  1680  -4200  2800
Toeplitz matrix. ,[object Object],[object Object],[object Object],[object Object],[object Object]
Summary of Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],- magic matrix - identity matrix - upper triangle - lower triangle - hilbert matrix - Inverse Hilbert matrix  - non-symmetric Toeplitz matrix
Dot Operator ,[object Object],[object Object],[object Object],[object Object]
Concatenation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Subscripts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Colon Operator (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Colon Operator (2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
matlABBA
The Colon Operator (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Colon Operator (2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Deleting Rows and Columns (1) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Deleting Rows and Columns (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The ‘FIND’ Command (1) >> x = -3:3 x = -3 -2 -1 0 1 2 3 K = find(abs(x) > 1) K = 1 2 6 7
The ‘FIND’ Command (2) A = [ 1 2 3 ; 4 5 6 ; 7 8 9] [i, j] = find (A > 5) i = 3 3 2 3 j = 1 2 3 3
Special Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],- default name for results - pi - “help eps” - count floating point ops - Infinity, e.g. 1/0 - Not a number, e.g. 0/0 - root minus one - why not ?
LOGO Command
The ‘PLOT’ Command (1)  ,[object Object],[object Object],[object Object],[object Object],[object Object]
The ‘PLOT’ Command (2) ,[object Object],[object Object],[object Object],[object Object]
 
The ‘PLOT’ Command (1)  ,[object Object],[object Object],[object Object],[object Object],[object Object]
The ‘PLOT’ Command (2) ,[object Object],[object Object],[object Object],[object Object]
PLOT Options ,[object Object],[object Object],[object Object],[object Object]
PLOT Options ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SUBPLOT Command ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Specialised matrices ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polynomials ,[object Object],[object Object],[object Object],[object Object],[object Object]
Polynomials ,[object Object],[object Object],[object Object]
Polynomials ,[object Object],[object Object],[object Object],[object Object]
Polynomial Addition/Sub ,[object Object],[object Object],[object Object],[object Object]
Polynomial Addition/Sub ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polynomial Multiplication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polynomial Division ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Polynomial Differentiation ,[object Object],[object Object],[object Object],[object Object]
Polynomial Evaluation ,[object Object],[object Object],[object Object],[object Object]
Rational Polynomials ,[object Object],[object Object],[object Object],[object Object]
An Anthropologist on Matlab
Data Analysis Functions (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Analysis Functions (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Symbolic Math Toolbox
Symbolic Expressions ,[object Object],[object Object],[object Object],[object Object]
Symbolic Expressions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Symbolic Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Advanced Operations ,[object Object],[object Object],[object Object],[object Object],[object Object]
Advanced Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Symbolic Differentiation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Symbolic Integration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Comments &Punctuation (1) ,[object Object],[object Object],[object Object],[object Object]
Comments &Punctuation (2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
SAVE Command (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SAVE Command (2) ,[object Object],[object Object],[object Object],[object Object]
Load Command ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
M-Files ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
IF Condition if condition {commands} end If x = 2 output = ‘x is even’ end
WHILE Loop while condition {commands} end X = 10; count = 0; while x > 2 x = x / 2; count = count + 1; end
FOR Loop for  x=array {commands} end for n = 1:10 x(n) = sin(n); end A = zeros(5,5); % prealloc for n = 1:5 for m = 5:-1:1 A(n,m) = n^2 + m^2; end disp(n) end
Creating a function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quick Exercise (!) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Flash Gordon   and the Mud Men of Matlab
Quick Exercise (!) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating Programs ,[object Object],function out = program(inputs) % PROGRAM <code> C:
Know Thyself ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quick Answer (!) function  c = mypoly(a,b) % MYPOLY  Add two polynomials of variable lengths  %  mypoly(a,b) add the polynomial A to the polynomial  %  B, even if they are of different length % %  Author: Damian Gordon %  Date  : 3/5/2001 %  Mod'd : x/x/2001 % c = [zeros(1,length(b) - length(a)) a] + [zeros(1, length(a) - length(b)) b];
Recursion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Curve Fitting ,[object Object],[object Object],[object Object],[object Object]
POLYFIT : Curve Fitting ,[object Object],[object Object],[object Object],[object Object],[object Object]
Curve Fitting Example ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Curve Fitting Example ,[object Object],[object Object],[object Object]
Interpolation - 1D ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Interpolation - 2D ,[object Object],TYPE = 'nearest' - nearest neighbor interpolation 'linear'  - bilinear interpolation 'cubic'  - bicubic interpolation 'spline'  - spline interpolation
Fourier Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tensors ,[object Object],[object Object],[object Object]
3D Graphics ,[object Object],[object Object]
3D Graphics ,[object Object],[object Object],[object Object]
3D Graphics ,[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Chetan Allapur
 
Matlab matrices and arrays
Matlab matrices and arraysMatlab matrices and arrays
Matlab matrices and arraysAmeen San
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabVidhyaSenthil
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabTarun Gehlot
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab IntroductionDaniel Moore
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABRavikiran A
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkreddyprasad reddyvari
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introductionideas2ignite
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to MatlabAmr Rashed
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab sessionDr. Krishna Mohbey
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1Elaf A.Saeed
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabBilawalBaloch1
 
Eigenvalues and eigenvectors
Eigenvalues and eigenvectorsEigenvalues and eigenvectors
Eigenvalues and eigenvectorsiraq
 

La actualidad más candente (20)

Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)Matlab (Presentation on MATLAB)
Matlab (Presentation on MATLAB)
 
Matlab matrices and arrays
Matlab matrices and arraysMatlab matrices and arrays
Matlab matrices and arrays
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Introduction to-matlab
Introduction to-matlabIntroduction to-matlab
Introduction to-matlab
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
What is matlab
What is matlabWhat is matlab
What is matlab
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab
MatlabMatlab
Matlab
 
Eigenvalues and eigenvectors
Eigenvalues and eigenvectorsEigenvalues and eigenvectors
Eigenvalues and eigenvectors
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
discrete maths notes.ppt
discrete maths notes.pptdiscrete maths notes.ppt
discrete maths notes.ppt
 

Similar a Introduction to MatLab programming

Similar a Introduction to MatLab programming (20)

Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab1
Matlab1Matlab1
Matlab1
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptx
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
Matlab
MatlabMatlab
Matlab
 
Matlab level 1.pptx
Matlab level 1.pptxMatlab level 1.pptx
Matlab level 1.pptx
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.ppt
 
20100528
2010052820100528
20100528
 
20100528
2010052820100528
20100528
 
Lec3
Lec3Lec3
Lec3
 
Idea for ineractive programming language
Idea for ineractive programming languageIdea for ineractive programming language
Idea for ineractive programming language
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture g
 
bobok
bobokbobok
bobok
 
Storyboard math
Storyboard mathStoryboard math
Storyboard math
 
Regression &amp; Classification
Regression &amp; ClassificationRegression &amp; Classification
Regression &amp; Classification
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
BUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdfBUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdf
 
Basic concepts in_matlab
Basic concepts in_matlabBasic concepts in_matlab
Basic concepts in_matlab
 
Mat lab day 1
Mat lab day 1Mat lab day 1
Mat lab day 1
 

Más de Damian T. Gordon

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Damian T. Gordon
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesDamian T. Gordon
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud ComputingDamian T. Gordon
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSDamian T. Gordon
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOTDamian T. Gordon
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricDamian T. Gordon
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDamian T. Gordon
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSUREDamian T. Gordon
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDamian T. Gordon
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDamian T. Gordon
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDamian T. Gordon
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsDamian T. Gordon
 

Más de Damian T. Gordon (20)

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless Computing
 
Cloud Identity Management
Cloud Identity ManagementCloud Identity Management
Cloud Identity Management
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 
How to Argue Logically
How to Argue LogicallyHow to Argue Logically
How to Argue Logically
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONS
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOT
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson Rubric
 
Evaluating Teaching: LORI
Evaluating Teaching: LORIEvaluating Teaching: LORI
Evaluating Teaching: LORI
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause Procedure
 
Designing Teaching: ADDIE
Designing Teaching: ADDIEDesigning Teaching: ADDIE
Designing Teaching: ADDIE
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSURE
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning Types
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of Instruction
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration Theory
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some Considerations
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 

Último (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 

Introduction to MatLab programming

  • 1. Zen and the Art of MatLab Damian Gordon
  • 2.
  • 3.
  • 4.
  • 8. MATLAB Command Window To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit www.mathworks.com. » » help HELP topics:
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. MATLAB Command Window » who Your variables are: a b c » whos Name Size Bytes Class a 8x8 512 double array b 9x9 648 double array c 9x9 648 double array Grand total is 226 elements using 1808 bytes
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24. Philosophiae Naturalis Principia Matlab ematica Damian Gordon
  • 26.
  • 27.
  • 28. Upper Triangle Matrix » a = ones(5) a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 » triu(a) ans = 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 0 1
  • 29. Lower Triangle Matrix » a = ones(5) a = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 » tril(a) ans = 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1
  • 30.
  • 31. Inverse Hilbert Matrix » invhilb(4) ans = 16 -120 240 -140 -120 1200 -2700 1680 240 -2700 6480 -4200 -140 1680 -4200 2800
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. The ‘FIND’ Command (1) >> x = -3:3 x = -3 -2 -1 0 1 2 3 K = find(abs(x) > 1) K = 1 2 6 7
  • 45. The ‘FIND’ Command (2) A = [ 1 2 3 ; 4 5 6 ; 7 8 9] [i, j] = find (A > 5) i = 3 3 2 3 j = 1 2 3 3
  • 46.
  • 48.
  • 49.
  • 50.  
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 68.
  • 69.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84. IF Condition if condition {commands} end If x = 2 output = ‘x is even’ end
  • 85. WHILE Loop while condition {commands} end X = 10; count = 0; while x > 2 x = x / 2; count = count + 1; end
  • 86. FOR Loop for x=array {commands} end for n = 1:10 x(n) = sin(n); end A = zeros(5,5); % prealloc for n = 1:5 for m = 5:-1:1 A(n,m) = n^2 + m^2; end disp(n) end
  • 87.
  • 88.
  • 89. Flash Gordon and the Mud Men of Matlab
  • 90.
  • 91.
  • 92.
  • 93. Quick Answer (!) function c = mypoly(a,b) % MYPOLY Add two polynomials of variable lengths % mypoly(a,b) add the polynomial A to the polynomial % B, even if they are of different length % % Author: Damian Gordon % Date : 3/5/2001 % Mod'd : x/x/2001 % c = [zeros(1,length(b) - length(a)) a] + [zeros(1, length(a) - length(b)) b];
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.