SlideShare a Scribd company logo
Matlab: Programming Environment
Your first runSection 1: The toolbar is where you can access the various features, tools and options regarding your code, debugging process, formatting, etc
Your first runSection 2: The file-manager shows your current directory and the files in it. You can change the directory by double clicking any folder or using the drop-down menu at the top.
Your first runSection 3: The command window is the place from where you tell MATLAB what is to be done! You have the option of either writing commands directly or running a 'MATLAB' file (with the extension .m) which would consist of commands, functions or programs.
Your first runSection 4: When you write a new program or type in some commands, you would almost always, use variables to store the values obtained. The workspace shows you all your current variables and their values and allows you to edit, copy or duplicate them.
Your first runSection 5: The command history window saves your recent commands and helps you in keeping a track of what you have been up to! It comes out quite handy when you have to use long commands repeatedly: Simply double click on that command in the command history window and it will start running!
MATLAB HelpMATLAB provides an excellent documentation of all its toolboxes and their respective commands. It also includes sample codes and examples! Go to the Help option and MATLAB and click on 'Product Help'(or simply press F1).
MATLAB HelpExplore the Help contents and you would find loads of useful things. Here is a snapshot of the first example in Image Processing toolbox. It teaches how to read and display an image.
Function Browser: a quick search tool!Click on 'Help' on the toolbar and go to 'Function Browser' (or press Shift+F1). This is what will pop up:
Function Browser: a quick search tool!The 'Function Browser', as the name suggests, is a quick search tool for description and synopsis of commands and functions of MATLAB. In the figure towards the right, I have searched for 'contrast' and it lists all the functions and commands related to that keyword.  It gives concise information about the function you are looking for.
Basic FunctionsMatlab allows us to define (and evaluate) our own functions as well. For example, lets define a function f(x)=x2+1. To do this, we simply type in f=x.^2+1. Since x has a value of 10, the answer is 101. We can now change the value of x. For example, type x=5 and enter, then type f=x.^2+1 again. We should now get 26.
Basic FunctionsAlmost all of Matlab's basic commands revolve around the use of vectors. A vector is defined by placing a sequence of numbers within square braces:>> v = [3 1] v = 3   1
Basic FunctionsTo view the vector just type its label:>> v 		v =    3      1 >> v = [3 1 7 -21 5 6]	 v =    3    1     7    -21    5     6
Basic FunctionsTo define a matrix, we can treat it like a column of row vectors (note that the spaces are required!):>> A = [ 1 2 3; 3 4 5; 6 7 8] A = 	1	 2 	3 		3 	4 	5 		6 	7 	8
Basic Functions the whoscommand will let you know all of the variables you have in your work space.>> whos Name 	Size	 Bytes 	Class A 		3x3 	72 	double array B 		3x3 	72	 double array v 		1x5 	40	 double array Grand total is 23 elements using 184 bytes
Basic Functions Sometimes you would like to clear all of your data and start over.  You do this with the "clear" command. >> clear >> whos
Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net
Ad

Recommended

Matlab Programming Tips Part 1
Matlab Programming Tips Part 1
Shameer Ahmed Koya
 
Matlab introduction
Matlab introduction
Ameen San
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
Murshida ck
 
How to work on Matlab.......
How to work on Matlab.......
biinoida
 
Matlab for diploma students(1)
Matlab for diploma students(1)
Retheesh Raj
 
Brief Introduction to Matlab
Brief Introduction to Matlab
Tariq kanher
 
MATLAB BASICS
MATLAB BASICS
butest
 
Matlab programming project
Matlab programming project
Assignmentpedia
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
Vijay Kumar Gupta
 
Procedures And Functions in Matlab
Procedures And Functions in Matlab
DataminingTools Inc
 
Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Matlab basic and image
Matlab basic and image
Divyanshu Rasauria
 
Matlab Basic Tutorial
Matlab Basic Tutorial
Muhammad Rizwan
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to Matlab Scripts
Introduction to Matlab Scripts
Shameer Ahmed Koya
 
MATLAB Programming
MATLAB Programming
محمدعبد الحى
 
Matlab m files and scripts
Matlab m files and scripts
Ameen San
 
Basics of programming in matlab
Basics of programming in matlab
AKANKSHA GUPTA
 
Matlab summary
Matlab summary
Vinnu Vinay
 
Matlab introduction lecture 1
Matlab introduction lecture 1
Mohamed Awni
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
reddyprasad reddyvari
 
C,C++ In Matlab
C,C++ In Matlab
DataminingTools Inc
 
MATLAB Scripts - Examples
MATLAB Scripts - Examples
Shameer Ahmed Koya
 
Matlab tut2
Matlab tut2
Vinnu Vinay
 
Matlab anilkumar
Matlab anilkumar
THEMASTERBLASTERSVID
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
Randa Elanwar
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
Malab tutorial
Malab tutorial
sisira senarathna
 
Matlab Tutorial.ppt
Matlab Tutorial.ppt
RaviMuthamala1
 

More Related Content

What's hot (20)

Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
Vijay Kumar Gupta
 
Procedures And Functions in Matlab
Procedures And Functions in Matlab
DataminingTools Inc
 
Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Matlab basic and image
Matlab basic and image
Divyanshu Rasauria
 
Matlab Basic Tutorial
Matlab Basic Tutorial
Muhammad Rizwan
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to Matlab Scripts
Introduction to Matlab Scripts
Shameer Ahmed Koya
 
MATLAB Programming
MATLAB Programming
محمدعبد الحى
 
Matlab m files and scripts
Matlab m files and scripts
Ameen San
 
Basics of programming in matlab
Basics of programming in matlab
AKANKSHA GUPTA
 
Matlab summary
Matlab summary
Vinnu Vinay
 
Matlab introduction lecture 1
Matlab introduction lecture 1
Mohamed Awni
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
reddyprasad reddyvari
 
C,C++ In Matlab
C,C++ In Matlab
DataminingTools Inc
 
MATLAB Scripts - Examples
MATLAB Scripts - Examples
Shameer Ahmed Koya
 
Matlab tut2
Matlab tut2
Vinnu Vinay
 
Matlab anilkumar
Matlab anilkumar
THEMASTERBLASTERSVID
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
Randa Elanwar
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
Vijay Kumar Gupta
 
Procedures And Functions in Matlab
Procedures And Functions in Matlab
DataminingTools Inc
 
Matlab 1(operations on_matrix)
Matlab 1(operations on_matrix)
harman kaur
 
Introduction to MATLAB
Introduction to MATLAB
Ravikiran A
 
Introduction to Matlab Scripts
Introduction to Matlab Scripts
Shameer Ahmed Koya
 
Matlab m files and scripts
Matlab m files and scripts
Ameen San
 
Basics of programming in matlab
Basics of programming in matlab
AKANKSHA GUPTA
 
Matlab introduction lecture 1
Matlab introduction lecture 1
Mohamed Awni
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
reddyprasad reddyvari
 
Introduction to matlab lecture 1 of 4
Introduction to matlab lecture 1 of 4
Randa Elanwar
 
Basic matlab and matrix
Basic matlab and matrix
Saidur Rahman
 
Introduction to matlab
Introduction to matlab
BilawalBaloch1
 

Similar to Matlab: Programming Environment (20)

Malab tutorial
Malab tutorial
sisira senarathna
 
Matlab Tutorial.ppt
Matlab Tutorial.ppt
RaviMuthamala1
 
Matlab Introduction
Matlab Introduction
Daniel Moore
 
Introduction to scientific computing with matlab.pptx
Introduction to scientific computing with matlab.pptx
CristianFloresMaldon
 
An Introduction to MATLAB with Worked Examples
An Introduction to MATLAB with Worked Examples
eAssessment in Practice Symposium
 
Basic matlab for beginners
Basic matlab for beginners
Kwabena Owusu-Agyemang
 
MATLAB INTRODUCTION
MATLAB INTRODUCTION
Dr. Krishna Mohbey
 
Matlab basics
Matlab basics
TrivediUrvi2
 
Introduction to matlab
Introduction to matlab
Indrani Jangete
 
MATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptx
lav8bell
 
Matlab Overviiew
Matlab Overviiew
Nazim Naeem
 
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
yassinebrh31
 
matlab_tutorial.ppt
matlab_tutorial.ppt
SudhirNayak43
 
matlab_tutorial.ppt
matlab_tutorial.ppt
KrishnaChaitanya139768
 
matlab_tutorial.ppt
matlab_tutorial.ppt
ManasaChevula1
 
Matlab guide
Matlab guide
aibad ahmed
 
Introduction to matlab
Introduction to matlab
BinodKumarSahu5
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyond
MahuaPal6
 
matlab tutorial with separate function description and handson learning
matlab tutorial with separate function description and handson learning
vishalkumarpandey12
 
Matlab brochure
Matlab brochure
Zabeel Institute
 
Matlab Introduction
Matlab Introduction
Daniel Moore
 
Introduction to scientific computing with matlab.pptx
Introduction to scientific computing with matlab.pptx
CristianFloresMaldon
 
MATLAB for Engineers ME1006 (1 for beginer).pptx
MATLAB for Engineers ME1006 (1 for beginer).pptx
lav8bell
 
Matlab Overviiew
Matlab Overviiew
Nazim Naeem
 
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
yassinebrh31
 
From zero to MATLAB hero: Mastering the basics and beyond
From zero to MATLAB hero: Mastering the basics and beyond
MahuaPal6
 
matlab tutorial with separate function description and handson learning
matlab tutorial with separate function description and handson learning
vishalkumarpandey12
 
Ad

More from matlab Content (20)

C,C++ In Matlab
C,C++ In Matlab
matlab Content
 
Matlab: Control Statements
Matlab: Control Statements
matlab Content
 
Matlab: Discrete Linear Systems
Matlab: Discrete Linear Systems
matlab Content
 
Matlab Distributions
Matlab Distributions
matlab Content
 
Matlab: Graph Plots
Matlab: Graph Plots
matlab Content
 
Matlab: Gui
Matlab: Gui
matlab Content
 
Matlab: Linear Methods, Quantiles
Matlab: Linear Methods, Quantiles
matlab Content
 
Matlab Data And Statistics
Matlab Data And Statistics
matlab Content
 
Matlab Feature Extraction Using Segmentation And Edge Detection
Matlab Feature Extraction Using Segmentation And Edge Detection
matlab Content
 
Matlab Image Enhancement Techniques
Matlab Image Enhancement Techniques
matlab Content
 
Matlab Image Restoration Techniques
Matlab Image Restoration Techniques
matlab Content
 
Matlab Importing Data
Matlab Importing Data
matlab Content
 
Matlab Organizing Data
Matlab Organizing Data
matlab Content
 
Matlab Text Files
Matlab Text Files
matlab Content
 
Matlab Visualizing Data
Matlab Visualizing Data
matlab Content
 
Matlab Working With Images
Matlab Working With Images
matlab Content
 
Matlab: Non Linear Methods
Matlab: Non Linear Methods
matlab Content
 
Matlab: Procedures And Functions
Matlab: Procedures And Functions
matlab Content
 
Matlab: Regression
Matlab: Regression
matlab Content
 
Matlab: Saving And Publishing
Matlab: Saving And Publishing
matlab Content
 
Matlab: Control Statements
Matlab: Control Statements
matlab Content
 
Matlab: Discrete Linear Systems
Matlab: Discrete Linear Systems
matlab Content
 
Matlab: Linear Methods, Quantiles
Matlab: Linear Methods, Quantiles
matlab Content
 
Matlab Data And Statistics
Matlab Data And Statistics
matlab Content
 
Matlab Feature Extraction Using Segmentation And Edge Detection
Matlab Feature Extraction Using Segmentation And Edge Detection
matlab Content
 
Matlab Image Enhancement Techniques
Matlab Image Enhancement Techniques
matlab Content
 
Matlab Image Restoration Techniques
Matlab Image Restoration Techniques
matlab Content
 
Matlab Organizing Data
Matlab Organizing Data
matlab Content
 
Matlab Visualizing Data
Matlab Visualizing Data
matlab Content
 
Matlab Working With Images
Matlab Working With Images
matlab Content
 
Matlab: Non Linear Methods
Matlab: Non Linear Methods
matlab Content
 
Matlab: Procedures And Functions
Matlab: Procedures And Functions
matlab Content
 
Matlab: Saving And Publishing
Matlab: Saving And Publishing
matlab Content
 
Ad

Recently uploaded (20)

GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Priyanka Aash
 
Security Tips for Enterprise Azure Solutions
Security Tips for Enterprise Azure Solutions
Michele Leroux Bustamante
 
AI VIDEO MAGAZINE - June 2025 - r/aivideo
AI VIDEO MAGAZINE - June 2025 - r/aivideo
1pcity Studios, Inc
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
You are not excused! How to avoid security blind spots on the way to production
You are not excused! How to avoid security blind spots on the way to production
Michele Leroux Bustamante
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
The Future of Product Management in AI ERA.pdf
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Techniques for Automatic Device Identification and Network Assignment.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Priyanka Aash
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Quantum AI: Where Impossible Becomes Probable
Quantum AI: Where Impossible Becomes Probable
Saikat Basu
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Priyanka Aash
 
UserCon Belgium: Honey, VMware increased my bill
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 

Matlab: Programming Environment

  • 2. Your first runSection 1: The toolbar is where you can access the various features, tools and options regarding your code, debugging process, formatting, etc
  • 3. Your first runSection 2: The file-manager shows your current directory and the files in it. You can change the directory by double clicking any folder or using the drop-down menu at the top.
  • 4. Your first runSection 3: The command window is the place from where you tell MATLAB what is to be done! You have the option of either writing commands directly or running a 'MATLAB' file (with the extension .m) which would consist of commands, functions or programs.
  • 5. Your first runSection 4: When you write a new program or type in some commands, you would almost always, use variables to store the values obtained. The workspace shows you all your current variables and their values and allows you to edit, copy or duplicate them.
  • 6. Your first runSection 5: The command history window saves your recent commands and helps you in keeping a track of what you have been up to! It comes out quite handy when you have to use long commands repeatedly: Simply double click on that command in the command history window and it will start running!
  • 7. MATLAB HelpMATLAB provides an excellent documentation of all its toolboxes and their respective commands. It also includes sample codes and examples! Go to the Help option and MATLAB and click on 'Product Help'(or simply press F1).
  • 8. MATLAB HelpExplore the Help contents and you would find loads of useful things. Here is a snapshot of the first example in Image Processing toolbox. It teaches how to read and display an image.
  • 9. Function Browser: a quick search tool!Click on 'Help' on the toolbar and go to 'Function Browser' (or press Shift+F1). This is what will pop up:
  • 10. Function Browser: a quick search tool!The 'Function Browser', as the name suggests, is a quick search tool for description and synopsis of commands and functions of MATLAB. In the figure towards the right, I have searched for 'contrast' and it lists all the functions and commands related to that keyword. It gives concise information about the function you are looking for.
  • 11. Basic FunctionsMatlab allows us to define (and evaluate) our own functions as well. For example, lets define a function f(x)=x2+1. To do this, we simply type in f=x.^2+1. Since x has a value of 10, the answer is 101. We can now change the value of x. For example, type x=5 and enter, then type f=x.^2+1 again. We should now get 26.
  • 12. Basic FunctionsAlmost all of Matlab's basic commands revolve around the use of vectors. A vector is defined by placing a sequence of numbers within square braces:>> v = [3 1] v = 3 1
  • 13. Basic FunctionsTo view the vector just type its label:>> v v = 3 1 >> v = [3 1 7 -21 5 6] v = 3 1 7 -21 5 6
  • 14. Basic FunctionsTo define a matrix, we can treat it like a column of row vectors (note that the spaces are required!):>> A = [ 1 2 3; 3 4 5; 6 7 8] A = 1 2 3 3 4 5 6 7 8
  • 15. Basic Functions the whoscommand will let you know all of the variables you have in your work space.>> whos Name Size Bytes Class A 3x3 72 double array B 3x3 72 double array v 1x5 40 double array Grand total is 23 elements using 184 bytes
  • 16. Basic Functions Sometimes you would like to clear all of your data and start over. You do this with the "clear" command. >> clear >> whos
  • 17. Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net