SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Introduction to  Matlab 7 Lesson I
How to connect to you folders ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
Matlab 7.0.4 - 7.10 ,[object Object],[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Matlab is an interatcive system for numerical computation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Matlab 7.0.4 - 7.10 ,[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  ,[object Object],[object Object],[object Object]
Matlab Introduction Window Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  File Structure Variable Editor Commands / Instructions Command History Variables / Structures Try it! Do not be too timid about your actions. All life is an experiment. The more you make, the better! Ralph Waldo Emerson
Variables Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Rules: ,[object Object],[object Object],[object Object],[object Object],Valid Examples a = 1 speed = 1500 BeamOutput_Type1 = v*Q*v’ name = ’John Smith’ Invalid Examples 2ndvariable = ’yes’ first one = 1 No need to specify the variable type
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Variables Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  By pressing  “w”+↑, the command who is recalled… Why these are arrays???   Every variable is an array!!!
[object Object],[object Object],[object Object],[object Object],[object Object],Variables Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  By pressing  ↑ or ↓, one can recall the previous commands By using the “ ; “  symbol at the end of a command, the execution is performed, but the result is not shown in the command window
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Vectors Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  If everything is an array, what is a vector ??? You should see: Fast help by: >> help linspace
[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],Vector's Arithmetic Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Addition/multiplication by constants Dot product of vectors Addition of vectors Your first matrix…    (3,1) ·(1,3) = (3,3) Error!    (1,3)·(1,3) = nothing Element-by-element operations Examples of functions returning  element-by-element operations
[object Object],[object Object],[object Object],[object Object],[object Object],Vector's Arithmetic II Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  (3,1)x(1,3)=(3,3)   Matrix! (1,3)x(3,1)=(1,1) SCALAR (dot product)   ! Never forget the rules for matrix multiplication!
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Arrays/Matrices Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Accessing Elements Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
[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],Arithmetic with Matrices Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Addition/multiplication by constants Addition of matrices Transpose Elimination of columns/lines Product between matrices Square of matrix Square of matrix's elements E i,j  = 2^A i,j Square-root of matrix's elements Square-root of matrix  (try: >> (sqrtm(A))^2) Inverse of A  (equal to: >> inv(A)) Remember: product between matrices is usually not commutative!
[object Object],[object Object],[object Object],[object Object],Matrix Division Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Two square matrices A divided by B, alternatively mrdevide(A,B)  equivalent to A*inv(B) The two divisions are different, because the product between matrices is not commutative! alternatively mldevide(A,B)  equivalent to inv(B)*A
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Other Ways of Creating Matrices Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Operators for Matrices Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  min(A) = -max(-A) var(A), std(A), …
Exercises ,[object Object],[object Object],[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
[object Object],[object Object],[object Object],Solution of Linear Algebraic Systems Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Shortcut
Exercises ,[object Object],[object Object],[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Structures in Matlab Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Structures are arrays whose names have dot-separated parts. They can be used to store information of different kinds together in a hierarchical structure.
[object Object],[object Object],Loops in Matlab Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Examples of Loops Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  A technique is a trick that works Giancarlo Rota
While Loops in Matlab ,[object Object],[object Object],Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  ,[object Object],[object Object],[object Object],The statement is executed as long as the expression is true The statements are executed an indefinite number of times
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Examples of Loops Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page #  Pre- allocate  arrays Vectorize  and use pre-defined  functions 20 times faster 129 times faster Make it right before you make it faster Elements of Programming Style (1978)

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
Santosh V
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab session
Dr. Krishna Mohbey
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
Anil Maurya
 

Was ist angesagt? (20)

Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab
MatlabMatlab
Matlab
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On PlottingMatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
 
Libro de MATLAB
Libro de MATLABLibro de MATLAB
Libro de MATLAB
 
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
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
application based Presentation on matlab simulink & related tools
application based Presentation on matlab simulink & related toolsapplication based Presentation on matlab simulink & related tools
application based Presentation on matlab simulink & related tools
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsAdvanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
 

Andere mochten auch

Andere mochten auch (16)

Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Pitfalls In Aspect Mining
Pitfalls In Aspect MiningPitfalls In Aspect Mining
Pitfalls In Aspect Mining
 
Trimble Geo 7 : Introduction
Trimble Geo 7 : IntroductionTrimble Geo 7 : Introduction
Trimble Geo 7 : Introduction
 
Nsm
Nsm Nsm
Nsm
 
Conditional Control in MATLAB Scripts
Conditional Control in MATLAB ScriptsConditional Control in MATLAB Scripts
Conditional Control in MATLAB Scripts
 
NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING
NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING
NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING
 
Numerical and statistical methods new
Numerical and statistical methods newNumerical and statistical methods new
Numerical and statistical methods new
 
numericai matmatic matlab uygulamalar ali abdullah
numericai matmatic  matlab  uygulamalar ali abdullahnumericai matmatic  matlab  uygulamalar ali abdullah
numericai matmatic matlab uygulamalar ali abdullah
 
Polynomials and Curve Fitting in MATLAB
Polynomials and Curve Fitting in MATLABPolynomials and Curve Fitting in MATLAB
Polynomials and Curve Fitting in MATLAB
 
Differential equation & laplace transformation with matlab
Differential equation & laplace transformation with matlabDifferential equation & laplace transformation with matlab
Differential equation & laplace transformation with matlab
 
MATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and IntegrationMATLAB : Numerical Differention and Integration
MATLAB : Numerical Differention and Integration
 
Numerical methods for 2 d heat transfer
Numerical methods for 2 d heat transferNumerical methods for 2 d heat transfer
Numerical methods for 2 d heat transfer
 
Interpolation and extrapolation
Interpolation and extrapolationInterpolation and extrapolation
Interpolation and extrapolation
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
FDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLABFDM Numerical solution of Laplace Equation using MATLAB
FDM Numerical solution of Laplace Equation using MATLAB
 
Guide To Windows 7 - Introduction to Windows 7
Guide To Windows 7 - Introduction to Windows 7Guide To Windows 7 - Introduction to Windows 7
Guide To Windows 7 - Introduction to Windows 7
 

Ähnlich wie Matlab

INTRODUCTION TO MATLAB for PG students.ppt
INTRODUCTION TO MATLAB for PG students.pptINTRODUCTION TO MATLAB for PG students.ppt
INTRODUCTION TO MATLAB for PG students.ppt
Karthik537368
 

Ähnlich wie Matlab (20)

Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyondFrom zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyond
 
Matlab1
Matlab1Matlab1
Matlab1
 
Matlab Overviiew
Matlab OverviiewMatlab Overviiew
Matlab Overviiew
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
INTRODUCTION TO MATLAB for PG students.ppt
INTRODUCTION TO MATLAB for PG students.pptINTRODUCTION TO MATLAB for PG students.ppt
INTRODUCTION TO MATLAB for PG students.ppt
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Data Structure & Algorithms - Matrix Multiplication
Data Structure & Algorithms - Matrix MultiplicationData Structure & Algorithms - Matrix Multiplication
Data Structure & Algorithms - Matrix Multiplication
 
Matlab summary
Matlab summaryMatlab summary
Matlab summary
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
gmrit-cse
gmrit-csegmrit-cse
gmrit-cse
 
Matlab anilkumar
Matlab  anilkumarMatlab  anilkumar
Matlab anilkumar
 
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptxMATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
chapter 1
chapter 1chapter 1
chapter 1
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
MATLAB guide
MATLAB guideMATLAB guide
MATLAB guide
 
Raushan's MATLB PPT..pptx
Raushan's MATLB PPT..pptxRaushan's MATLB PPT..pptx
Raushan's MATLB PPT..pptx
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

Matlab

  • 1. Introduction to Matlab 7 Lesson I
  • 2.
  • 3.
  • 4.
  • 5. Matlab Introduction Window Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Matlab Introduction Course – Page # File Structure Variable Editor Commands / Instructions Command History Variables / Structures Try it! Do not be too timid about your actions. All life is an experiment. The more you make, the better! Ralph Waldo Emerson
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.