SlideShare a Scribd company logo
WELLCOME
TO
OUR PRESENTATION
MATLAB Basics
Akibur Rahman
ID-13142108022
EEE 11th Intake; BUBT
Introduction
What is MATLAB ?
• MATLAB is a computer program that combines computation and visualization power
that makes it particularly useful tool for engineers.
• MATLAB is an executive program, and a script can be made with a list of MATLAB
commands like other programming language.
 MATLAB Stands for MATrix LABoratory.
• The system was designed to make matrix computation particularly easy.
 The MATLAB environment allows the user to:
• manage variables
• import and export data
• perform calculations
• generate plots
• develop and manage files for use with MATLAB.
MATrix LABoratory
• Advantages of MATLAB
• Ease of use
• Platform independence
• Predefined functions
• Plotting
• Disadvantages of MATLAB
• Can be slow
• Commercial software
Typical uses include
• Math and computation
• Algorithm development
• Modeling, simulation, and prototyping
• Data analysis, exploration, and visualization
• Scientific and engineering graphics
• Application development, including graphical
user interface (GUI) building.
•To start MATLAB:
•START 
PROGRAMS 
MATLAB 2k16 
MATLAB 2k16
MATLAB Environment
Display Windows
Display Windows with start button
Display Windows (con’t…)
• Command Window: Enter all commands here
• Workspace Window: Shows the list of variable used
• Command History Window: Shows the command history
• Current Directory Window: Displays current working
directory
• Graphic (Figure) Window
• Displays plots and graphs
• Created in response to graphics commands.
• M-file editor/debugger window
• Create and edit scripts of commands called M-files.
Command Window
•Here all the command are
entered.
•Try the following commands
Example 1
• Find the value of z for the expression z=x+y, if x=5 and y=7.
• Solution:
•Workspace windows for above example
•Command history window
for above example
Example 2:Graphic (Figure) Window
• Plotting the sin wave
• Figure window
Types of Files
•1. M-Files
•2. MAT-Files
•3. MEX-Files
Types of Files cont…
•1. M-Files:
ASCII text files with .m extension. Any
program written in MATLAB editor is
saved as M-file.
Two types
Script Files : .m files with MATLAB commends
Function Files : .m files of function
Types of Files cont…
• 2. MAT-Files:
Binary data file with .mat extension. These are
created by MATLAB when data is saved from
workspace.
• 3.MEX-Files:
It is MATLAB callable FORTRAN and C Program, with .mex
extension.
Set Path
• To execute a file/help, it must be in proper (default)
directory.
• If it is in some other folder, set the folder path
• Go to File->set Path->
Some Commends
• General Commands
• Clock :Provides clock time and data as a vector
• Date :Provides data as a string
• Ver :Gives the version of MATLAB installed
• Workspace Commands
• Who :Lists the variables currently in the worksapce
• Whos :Same as who but ges more information sach as
type and size etc
• What :Lists .m, .mat and .mex files on the disk
• Clear :To clear workspace variables
• Clc :To clear command windows
• Clf :To clear current figure window
Some Commends conti…
• Termination
• Ctl-c :local abort, kills the current command execution
• Quit :quits MATLAB
• Exit :same as quit
• Help
help :lists topics on which help is available
• help help :provides information on use of the help command
• Helpwin :opens the interactive help window
• Helpdesk :opens the web browser based help facility
• help topic :provides help on topic
• Demo : runs the demo program
• lookfor keyword :Search all M-files for keyword
•
Getting Help (con’t…)
• Google “MATLAB helpdesk”
• Go to the online HelpDesk provided by
www.mathworks.com
You can find EVERYTHING you
need to know about MATLAB
from the online HelpDesk.
Saidur Rahman
ID:13142108020
EEE 11th Intake,BUBT
Array Creation
• To create an array with four elements in a single row, separate the elements
with either a comma (,) or a space.
• To create a matrix that has multiple rows, separate the rows with semicolons.
Matrix addressing
Colon operator A(:,n)Colon operator A(n,:)
Colon operator A(:,m:n) & A(m:n,:)
Colon operator A(p:q,m:n)
Matrix Operations
• Addition +
• Subtraction -
• Multiplication x
• Power ^
• Transpose `
• Left Division 
• Right division /
Matrix additionMatrix Subtraction
Matrix MultiplicationMatrix Power
Matrix Transpose
Left Division & Right division
Matrix Building Functions
• Convenient Matrix Building
Functions are
• Eye
• Zeros
• Ones
• Diag
• Triu
• Tril
• Rand
• Hilb
• Magic
• Toeplitz
Eye, Zeros, Ones, Diag Matrix
Triu matrixTril matrixRand, Hilb matrix
Magic, Toeplitz matrix
>>disp(‘Any Question?’)

More Related Content

What's hot

Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Damian T. Gordon
 
Loops in matlab
Loops in matlabLoops in matlab
Loops in matlabTUOS-Sam
 
Matlab practical and lab session
Matlab practical and lab sessionMatlab practical and lab session
Matlab practical and lab sessionDr. Krishna Mohbey
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlabSantosh V
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
aman gupta
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
Tarun Gehlot
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
Mohan Raj
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
Daniel Moore
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
Elaf A.Saeed
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and Basics
Techsparks
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
ideas2ignite
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
Bhavesh Shah
 
Matlab introduction lecture 1
Matlab introduction lecture 1Matlab introduction lecture 1
Matlab introduction lecture 1
Mohamed Awni
 
Matlab intro
Matlab introMatlab intro
Matlab intro
Chaitanya Banoth
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
krajeshk1980
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
Vijay Kumar Gupta
 
Seminar on MATLAB
Seminar on MATLABSeminar on MATLAB
Seminar on MATLAB
Dharmesh Tank
 

What's hot (20)

Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Loops in matlab
Loops in matlabLoops in matlab
Loops in 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
 
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
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
MATLAB Basics-Part1
MATLAB Basics-Part1MATLAB Basics-Part1
MATLAB Basics-Part1
 
Matlab - Introduction and Basics
Matlab - Introduction and BasicsMatlab - Introduction and Basics
Matlab - Introduction and Basics
 
MATLAB INTRODUCTION
MATLAB INTRODUCTIONMATLAB INTRODUCTION
MATLAB INTRODUCTION
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab introduction lecture 1
Matlab introduction lecture 1Matlab introduction lecture 1
Matlab introduction lecture 1
 
Matlab intro
Matlab introMatlab intro
Matlab intro
 
Importance of matlab
Importance of matlabImportance of matlab
Importance of matlab
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
 
Seminar on MATLAB
Seminar on MATLABSeminar on MATLAB
Seminar on MATLAB
 
Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 

Similar to Basic matlab and matrix

Chapter 1 matlab demo
Chapter 1 matlab demoChapter 1 matlab demo
Chapter 1 matlab demo
Pranoti Doke
 
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.ppt
ssuserdee4d8
 
Mit6 094 iap10_lec01
Mit6 094 iap10_lec01Mit6 094 iap10_lec01
Mit6 094 iap10_lec01
Tribhuwan Pant
 
MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment Help
Essay Corp
 
Lecture 01 variables scripts and operations
Lecture 01   variables scripts and operationsLecture 01   variables scripts and operations
Lecture 01 variables scripts and operations
Smee Kaem Chann
 
MATLAB_CIS601-03.ppt
MATLAB_CIS601-03.pptMATLAB_CIS601-03.ppt
MATLAB_CIS601-03.ppt
aboma2hawi
 
communication system.docx
communication system.docxcommunication system.docx
communication system.docx
MuhammadUsman627082
 
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
 
EE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manualEE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manual
Velalar College of Engineering and Technology
 
SoftwareApplicationInTermsOFMatlabSimulation
SoftwareApplicationInTermsOFMatlabSimulationSoftwareApplicationInTermsOFMatlabSimulation
SoftwareApplicationInTermsOFMatlabSimulation
MechTech9
 
4413-lecture-09 Introduction Matlab lecture .ppt
4413-lecture-09 Introduction Matlab lecture .ppt4413-lecture-09 Introduction Matlab lecture .ppt
4413-lecture-09 Introduction Matlab lecture .ppt
aaaaboud1
 
Matlab pt1
Matlab pt1Matlab pt1
Matlab pt1
Austin Baird
 
Matlab Tutorial.ppt
Matlab Tutorial.pptMatlab Tutorial.ppt
Matlab Tutorial.ppt
RaviMuthamala1
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
Ravibabu Kancharla
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
Vinay Kumar
 
Chapter 2 Basics of MATLAB
Chapter 2 Basics of MATLABChapter 2 Basics of MATLAB
Chapter 2 Basics of MATLAB
Pranoti Doke
 
++Matlab 14 sesiones
++Matlab 14 sesiones++Matlab 14 sesiones
++Matlab 14 sesiones
Rosemberth Rodriguez
 
Matlab practical ---1.pdf
Matlab practical ---1.pdfMatlab practical ---1.pdf
Matlab practical ---1.pdf
Central university of Haryana
 

Similar to Basic matlab and matrix (20)

Chapter 1 matlab demo
Chapter 1 matlab demoChapter 1 matlab demo
Chapter 1 matlab demo
 
MATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.pptMATLAB workshop lecture 1MATLAB work.ppt
MATLAB workshop lecture 1MATLAB work.ppt
 
Mit6 094 iap10_lec01
Mit6 094 iap10_lec01Mit6 094 iap10_lec01
Mit6 094 iap10_lec01
 
MATLAB Assignment Help
MATLAB Assignment HelpMATLAB Assignment Help
MATLAB Assignment Help
 
Lecture 01 variables scripts and operations
Lecture 01   variables scripts and operationsLecture 01   variables scripts and operations
Lecture 01 variables scripts and operations
 
MATLAB_CIS601-03.ppt
MATLAB_CIS601-03.pptMATLAB_CIS601-03.ppt
MATLAB_CIS601-03.ppt
 
communication system.docx
communication system.docxcommunication system.docx
communication system.docx
 
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
 
EE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manualEE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manual
 
SoftwareApplicationInTermsOFMatlabSimulation
SoftwareApplicationInTermsOFMatlabSimulationSoftwareApplicationInTermsOFMatlabSimulation
SoftwareApplicationInTermsOFMatlabSimulation
 
4413-lecture-09 Introduction Matlab lecture .ppt
4413-lecture-09 Introduction Matlab lecture .ppt4413-lecture-09 Introduction Matlab lecture .ppt
4413-lecture-09 Introduction Matlab lecture .ppt
 
Matlab lec1
Matlab lec1Matlab lec1
Matlab lec1
 
Matlab pt1
Matlab pt1Matlab pt1
Matlab pt1
 
Matlab Tutorial.ppt
Matlab Tutorial.pptMatlab Tutorial.ppt
Matlab Tutorial.ppt
 
Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
MATLAB & Image Processing
MATLAB & Image ProcessingMATLAB & Image Processing
MATLAB & Image Processing
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
Chapter 2 Basics of MATLAB
Chapter 2 Basics of MATLABChapter 2 Basics of MATLAB
Chapter 2 Basics of MATLAB
 
++Matlab 14 sesiones
++Matlab 14 sesiones++Matlab 14 sesiones
++Matlab 14 sesiones
 
Matlab practical ---1.pdf
Matlab practical ---1.pdfMatlab practical ---1.pdf
Matlab practical ---1.pdf
 

Recently uploaded

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 

Recently uploaded (20)

Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 

Basic matlab and matrix

  • 3. Introduction What is MATLAB ? • MATLAB is a computer program that combines computation and visualization power that makes it particularly useful tool for engineers. • MATLAB is an executive program, and a script can be made with a list of MATLAB commands like other programming language.  MATLAB Stands for MATrix LABoratory. • The system was designed to make matrix computation particularly easy.  The MATLAB environment allows the user to: • manage variables • import and export data • perform calculations • generate plots • develop and manage files for use with MATLAB.
  • 4. MATrix LABoratory • Advantages of MATLAB • Ease of use • Platform independence • Predefined functions • Plotting • Disadvantages of MATLAB • Can be slow • Commercial software
  • 5. Typical uses include • Math and computation • Algorithm development • Modeling, simulation, and prototyping • Data analysis, exploration, and visualization • Scientific and engineering graphics • Application development, including graphical user interface (GUI) building.
  • 6. •To start MATLAB: •START  PROGRAMS  MATLAB 2k16  MATLAB 2k16 MATLAB Environment
  • 8. Display Windows with start button
  • 9. Display Windows (con’t…) • Command Window: Enter all commands here • Workspace Window: Shows the list of variable used • Command History Window: Shows the command history • Current Directory Window: Displays current working directory • Graphic (Figure) Window • Displays plots and graphs • Created in response to graphics commands. • M-file editor/debugger window • Create and edit scripts of commands called M-files.
  • 10. Command Window •Here all the command are entered. •Try the following commands
  • 11. Example 1 • Find the value of z for the expression z=x+y, if x=5 and y=7. • Solution:
  • 12. •Workspace windows for above example
  • 14. Example 2:Graphic (Figure) Window • Plotting the sin wave • Figure window
  • 15. Types of Files •1. M-Files •2. MAT-Files •3. MEX-Files
  • 16. Types of Files cont… •1. M-Files: ASCII text files with .m extension. Any program written in MATLAB editor is saved as M-file. Two types Script Files : .m files with MATLAB commends Function Files : .m files of function
  • 17. Types of Files cont… • 2. MAT-Files: Binary data file with .mat extension. These are created by MATLAB when data is saved from workspace. • 3.MEX-Files: It is MATLAB callable FORTRAN and C Program, with .mex extension.
  • 18. Set Path • To execute a file/help, it must be in proper (default) directory. • If it is in some other folder, set the folder path • Go to File->set Path->
  • 19. Some Commends • General Commands • Clock :Provides clock time and data as a vector • Date :Provides data as a string • Ver :Gives the version of MATLAB installed • Workspace Commands • Who :Lists the variables currently in the worksapce • Whos :Same as who but ges more information sach as type and size etc • What :Lists .m, .mat and .mex files on the disk • Clear :To clear workspace variables • Clc :To clear command windows • Clf :To clear current figure window
  • 20. Some Commends conti… • Termination • Ctl-c :local abort, kills the current command execution • Quit :quits MATLAB • Exit :same as quit • Help help :lists topics on which help is available • help help :provides information on use of the help command • Helpwin :opens the interactive help window • Helpdesk :opens the web browser based help facility • help topic :provides help on topic • Demo : runs the demo program • lookfor keyword :Search all M-files for keyword •
  • 21. Getting Help (con’t…) • Google “MATLAB helpdesk” • Go to the online HelpDesk provided by www.mathworks.com You can find EVERYTHING you need to know about MATLAB from the online HelpDesk.
  • 23. Array Creation • To create an array with four elements in a single row, separate the elements with either a comma (,) or a space. • To create a matrix that has multiple rows, separate the rows with semicolons.
  • 25. Colon operator A(:,n)Colon operator A(n,:)
  • 28. Matrix Operations • Addition + • Subtraction - • Multiplication x • Power ^ • Transpose ` • Left Division • Right division /
  • 32. Left Division & Right division
  • 33. Matrix Building Functions • Convenient Matrix Building Functions are • Eye • Zeros • Ones • Diag • Triu • Tril • Rand • Hilb • Magic • Toeplitz
  • 34. Eye, Zeros, Ones, Diag Matrix