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

More Related Content

PPTX
Introduction to flowchart
PPT
Creating a program from flowchart
PPT
Ppt lesson 06
PPT
Algorithm and Flowcharts
ODP
Basic Flowcharting
PPS
C programming session 10
PPTX
Basic computer-programming-2
PPT
Lesson plan 2 matt 3
Introduction to flowchart
Creating a program from flowchart
Ppt lesson 06
Algorithm and Flowcharts
Basic Flowcharting
C programming session 10
Basic computer-programming-2
Lesson plan 2 matt 3

Viewers also liked (20)

PPTX
Data Applied: Correlation
PPTX
All life is yoga
PDF
1 yoga for physical stamina
PDF
Ontwikkeling In Eigen Handen Nl Web
PPTX
Data Mining The Sky
PDF
Apresentação Red Advisers
PPTX
Knowledge Discovery
PPTX
SPSS: File Managment
PPTX
Retrieving Data From A Database
PPTX
Public Transportation
PPTX
LISP: Errors In Lisp
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
PPTX
Classification
PPTX
Txomin Hartz Txikia
PPTX
Data Applied:Tree Maps
PPTX
Procedures And Functions in Matlab
PPTX
Txomin Hartz Txikia
PPTX
R: Apply Functions
PPTX
Portavocía en redes sociales
Data Applied: Correlation
All life is yoga
1 yoga for physical stamina
Ontwikkeling In Eigen Handen Nl Web
Data Mining The Sky
Apresentação Red Advisers
Knowledge Discovery
SPSS: File Managment
Retrieving Data From A Database
Public Transportation
LISP: Errors In Lisp
MS SQL SERVER: Microsoft sequence clustering and association rules
Classification
Txomin Hartz Txikia
Data Applied:Tree Maps
Procedures And Functions in Matlab
Txomin Hartz Txikia
R: Apply Functions
Portavocía en redes sociales
Ad

Similar to Programming Environment in Matlab (20)

PDF
Malab tutorial
PPT
Matlab Tutorial.ppt
PPT
Matlab Introduction
PPTX
Introduction to scientific computing with matlab.pptx
PDF
An Introduction to MATLAB with Worked Examples
PDF
MATLAB Programming
PDF
Basic matlab for beginners
PDF
MATLAB INTRODUCTION
PPT
Matlab basics
DOCX
MATLAB BASICS
DOCX
Introduction to matlab
PPT
Brief Introduction to Matlab
PPTX
MATLAB for Engineers ME1006 (1 for beginer).pptx
PPT
Matlab Overviiew
PPTX
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
PPT
matlab_tutorial.ppt
PPT
matlab_tutorial.ppt
PPT
matlab_tutorial.ppt
PDF
Matlab guide
PDF
Introduction to matlab
Malab tutorial
Matlab Tutorial.ppt
Matlab Introduction
Introduction to scientific computing with matlab.pptx
An Introduction to MATLAB with Worked Examples
MATLAB Programming
Basic matlab for beginners
MATLAB INTRODUCTION
Matlab basics
MATLAB BASICS
Introduction to matlab
Brief Introduction to Matlab
MATLAB for Engineers ME1006 (1 for beginer).pptx
Matlab Overviiew
Chap#0_Introducation_to_nsnsnnMATLAB.pptx
matlab_tutorial.ppt
matlab_tutorial.ppt
matlab_tutorial.ppt
Matlab guide
Introduction to matlab
Ad

More from DataminingTools Inc (20)

PPTX
Terminology Machine Learning
PPTX
Techniques Machine Learning
PPTX
Machine learning Introduction
PPTX
Areas of machine leanring
PPTX
AI: Planning and AI
PPTX
AI: Logic in AI 2
PPTX
AI: Logic in AI
PPTX
AI: Learning in AI 2
PPTX
AI: Learning in AI
PPTX
AI: Introduction to artificial intelligence
PPTX
AI: Belief Networks
PPTX
AI: AI & Searching
PPTX
AI: AI & Problem Solving
PPTX
Data Mining: Text and web mining
PPTX
Data Mining: Outlier analysis
PPTX
Data Mining: Mining stream time series and sequence data
PPTX
Data Mining: Mining ,associations, and correlations
PPTX
Data Mining: Graph mining and social network analysis
PPTX
Data warehouse and olap technology
PPTX
Data Mining: Data processing
Terminology Machine Learning
Techniques Machine Learning
Machine learning Introduction
Areas of machine leanring
AI: Planning and AI
AI: Logic in AI 2
AI: Logic in AI
AI: Learning in AI 2
AI: Learning in AI
AI: Introduction to artificial intelligence
AI: Belief Networks
AI: AI & Searching
AI: AI & Problem Solving
Data Mining: Text and web mining
Data Mining: Outlier analysis
Data Mining: Mining stream time series and sequence data
Data Mining: Mining ,associations, and correlations
Data Mining: Graph mining and social network analysis
Data warehouse and olap technology
Data Mining: Data processing

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
Teaching material agriculture food technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced IT Governance
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PDF
Sensors and Actuators in IoT Systems using pdf
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
Cloud computing and distributed systems.
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Teaching material agriculture food technology
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced IT Governance
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Sensors and Actuators in IoT Systems using pdf
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Advanced Soft Computing BINUS July 2025.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
madgavkar20181017ppt McKinsey Presentation.pdf

Programming Environment in Matlab

  • 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