SlideShare ist ein Scribd-Unternehmen logo
1 von 47
 This course will:
› Introduce the basic functionality of MATLAB
› Demonstrate its utility in scientific research
› Identify interesting concepts and useful
techniques in scientific computing
By the end of the course, you should have
the skills necessary to apply MATLAB to
your research and learn how to extend
its capabilities
2
 Introduction: What is Matlab, History of Matlab,
strengths, weakness
 Getting familiar with the interface: Layout, Pull down
menus
 Creating and manipulating objects: Variables
(scalars, vectors, matrices, text strings), Operators
(arithmetic, relational, logical) and built-in functions
 Flow control: Conditional and iteration blocks
 Data transport: Importing into/Exporting from the
workspace
 Plotting with Matlab
 M-files and UserDefined functions
3
 Introduction:
› What is Matlab,
› History of Matlab,
› strengths, weakness
 Getting familiar with the interface:
› Layout,
› Pull down menus
 Creating and manipulating variables
 MATLAB is a program for doing numerical
computation.
 It was originally designed for solving linear
algebra type problems using matrices.
 Its name is derived from MATrix LABoratory
5
 MATLAB has since been expanded and now
has built-in functions for solving problems
requiring
› data analysis,
› signal processing,
› optimization,
› and several other types of scientific computations.
 It also contains functions for 2-D and 3-D
graphics and animation.
6
 Application kernel, e.g., matlab-7.7
 Computational engine
 Built-in low level algorithms (no source code)
 Includes a variety of graphical capabilities
 Suite with contemporary releases, e.g. R2008b
 Programming language
 Designed to solve problems numerically
(Particularly good for matrix operations)
 Easy to learn and use (Simplier syntax rules than
Fortran or C)
7
 Auxiliaries – usually bundled with kernel
› Simulink (dynamic systems modeling)
› Stateflow (event and logic-driven modeling)
 Toolboxes - designed for specific applications
› Specialized collections of MATLAB source files
 Developed or supported by MathWorks Inc.
Signal Processing, Optimization, Control System, etc.
 Downloadable third party freeware
Multiple precision arithmetic, robotics, etc.
Resource:
http://www.mathworks.com/matlabcentral/
8
 Originally written in Fortran
› Author: Cleve Moler, Univ. of New Mexico
 Mathworks, Inc. founded to further develop it.
› Incorporated in 1984
› Core is written in C
› Graphical interface is written in Java
› Runs on many platforms
 Unix – Solaris, SGI, AIX, Digital Unix
 Linux
 Windows
 Mac OS
9
 MATLAB is relatively easy to learn
 MATLAB code is optimized to be relatively
quick when performing matrix operations
 MATLAB may behave like a calculator or as a
programming language
 MATLAB is interpreted, errors are easier to fix
 Although primarily procedural, MATLAB does
have some object-oriented elements
10
 MATLAB is NOT a general purpose
programming language
 MATLAB is an interpreted language (making it
for the most part slower than a compiled
language such as C++)
 MATLAB is designed for scientific computation
and is not suitable for some things (such as
parsing text)
11
 Command window: Type your instructions here
and press ENTER to execute them.
12
 The MATLAB environment is command
oriented somewhat like UNIX.
 A prompt (>>) appears on the screen and a
MATLAB statement can be entered. When
the <ENTER> key is pressed, the statement is
executed, and another prompt appears.
 If a statement is terminated with a
semicolon ( ; ), no results will be displayed.
Otherwise results will appear before the
next prompt.
13
 Example
14
» a=5;
» b=a/2
b =
2.5000
»
 Command history: a list of instructions executed by
MATLAB is shown here.
 Workspace: shows a list of variables created by
MATLAB. As you can see, the value of ‘A’ is shown.
15
16
17
18
19
20
21
22
23
 Help
› Launch Matlab Help Window
 Help > Product Help > MATLAB
› See Demos
 Help > Demos
 Or Type help at the Matlab prompt or help followed by
a function name for help on a specific function
 Online:
› Online documentation for Matlab at the MathWorks
website
http://www.mathworks.com/access/helpdesk/help/techdo
c/matlab.html
› There are also numerous tutorials online that are easily
found with a web search.
24
25
26
27
 “%” is the neglect sign for Matlab (equaivalent
of “//” in C). Anything after it on the same line
is neglected by Matlab compiler.
 Sometimes slowing down the execution is done
deliberately for observation purposes. You can
use the command “pause” for this purpose
28
 >> clear % clears all objects in
workspace
 >> clear x y % clears values of
objects x and y
 >> clc % clears command
window scroll buffer
 >> which <filename> % finds first occurrence
in search path
 >> who % lists all objects in the
workspace
 >> <command> ; % semicolon →
% execute, no display
in command window
29
 >> <control> c % stops program
execution
 >> <control> q % stops execution and
exits Matlab
 >> <begin command text > … % three dots → continue
to next line
 >> whos % List known variables plus
their size
 >> help sqrt % Help on using sqrt
 >> lookfor sqrt % Search for keyword sqrt
in on MATLABPATH.
 >> what ('directory') % List MATLAB files in
directory
30
 >> dir %List all files in current directory
 >> ls % Same as dir
 >> type test %Display the content of test.m
in command window
 >> delete test % Delete test.m
 >> cd a: % Change directory to a:
 >> chdir a: % Same as cd
 >> pwd % Show current directory
 >> which test % Display directory path to
‘closest’ test.m
31
 Top navigation bar with pull-down menus
 File
 Edit
 Debug
 Desktop
 Window
 Help
 Toolbar with icons
 Current Directory path identified
32
 File
› New (create new m-file, figure, variable)
› Import Data
› Set Path (folders, directories to search)
› Preferences > Command Window
(number format, scroll buffer size)
 Edit
› Find, Delete, Copy, Paste, etc.
33
 Desktop
› Choose layout for display of windows
 Original on launch
 Desktop > Save Layout (if you like it) with a name
 Modify original if desired
 Desktop > Save Layout (if you like it) with a name
 Default layout (new in R2008b)
 You can always start over from this configuration
 Desktop > Desktop Layout > Default
34
 Numerical values
› Sequence of base 10 digits
 Binary, hex representations are character strings
› Period as radix point for floating point
numbers
› Lower case e for power of 10 exponent
 Example: >> x = 123.456e-07
→ x = 0.0000123456
[ not (123.456)*(2.71828,,,)-7 ]
35
 Complex numbers
› i and j initially set to the square root of -1
Imaginary part has i or j appended
(1+1i) is a single complex number
object
(1+1*i) is a sum of one and current
value of i
36
 Matrices
› Rectangular arrays of elements
 Indexed by row, then by column
Example: >> A = [ a(1,1) a(1,2); a(2,1) a(2,2)]
37
 Boolean logicals (Bernoulli variables)
› Truth Values
 1 for true;
 0 for false
› Primary logic symbols
 & logical AND
 == logical equal
 | logical inclusive OR
 ~ logical NOT
› Compound logic symbols
 < Less Than
 <= Less Than or Equal
 > Greater Than
 >= Greater Than or Equal
 == Equal To
 ~= Not Equal To
38
 MATLAB also supports some logical
functions.
› any(x) returns 1 if any element of x is nonzero
› all(x) returns 1 if all elements of x are nonzero
› isnan(x) returns 1 at each NaN in x
› isinf(x) returns 1 at each infinity in x
› finite(x) returns 1 at each finite value in x
39
 Separators and delimiters
 [ ] square brackets -- vector and matrix delimiters
 { } curly brackets -- cell delimiter
 ( ) parentheses
* Grouping in compound expressions
* Vector and matrix element indices
* Function argument
 : colon -- index range separator
 ; semicolon -- matrix row separator
 <space> matrix column separator
 , comma -- matrix index, function argument
separator, row vector element separator
 ' ' single quotes -- demarcation of character strings
40
 Data Types:
41
 Have not to be previously declared type in a variable
name and type in its value.
 MATLAB will decide on the data type automatically,
so you don’t have to declare its data type.
 Variable names can contain up to 63 characters
 Variable names must start with a letter followed by
letters, digits, and underscores.
 Variable names are case sensitive
42
 Example of illegal variable names:
43
 Matlab Special Variables
 ans Default variable name for results
 pi Value of π
 eps Smallest incremental number
 inf Infinity
 NaN Not a number e.g. 0/0
 realmin The smallest usable positive real number
 realmax The largest usable positive real number
44
 Assignment = a = b (assign b to a)
 Addition + a + b
 Subtraction - a -b
 Multiplication * or.* a*b or a.*b
 Division / or ./ a/b or a./b
 Power ^ or .^ a^b or a.^b
45
 Type the following expressions into MATLAB at the
command window, and observe the results:
1. >> for = 5
2. >> else =6
3. >> cos = 3;
>> cos(0)
4. >> A = [1,2,3];
>> sum(A)
>> sum = 7;
>> sum(A)
 Type the following expressions into MATLAB at
the command window, and observe the
results:
5. >> 5>2
6. >> 5<4
7. >> 1.5<=1.5
8. >> 2>=pi
9. >> 1.8==1.801
10. >> 1.8~=2
11. >> 1.8==1.80000000000000000000000001 (see
what happen)

Weitere ähnliche Inhalte

Was ist angesagt?

Basic operators in matlab
Basic operators in matlabBasic operators in matlab
Basic operators in matlabrishiteta
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to MatlabAmr Rashed
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlabAnil Maurya
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingDr. Manjunatha. P
 
Matlab introduction lecture 1
Matlab introduction lecture 1Matlab introduction lecture 1
Matlab introduction lecture 1Mohamed Awni
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersMurshida ck
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introductionAmeen San
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLABBhavesh Shah
 
Matlab simulink introduction
Matlab simulink introductionMatlab simulink introduction
Matlab simulink introductionAmeen San
 
Matlab day 1: Introduction to MATLAB
Matlab day 1: Introduction to MATLABMatlab day 1: Introduction to MATLAB
Matlab day 1: Introduction to MATLABreddyprasad reddyvari
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)Memo Love
 
Presentation on LabVIEW Basics
Presentation on LabVIEW BasicsPresentation on LabVIEW Basics
Presentation on LabVIEW BasicsHimshekhar Das
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adderGaditek
 

Was ist angesagt? (20)

Matlab Basic Tutorial
Matlab Basic TutorialMatlab Basic Tutorial
Matlab Basic Tutorial
 
Basic operators in matlab
Basic operators in matlabBasic operators in matlab
Basic operators in matlab
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Matlab Workshop Presentation
Matlab Workshop PresentationMatlab Workshop Presentation
Matlab Workshop Presentation
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
 
Matlab introduction lecture 1
Matlab introduction lecture 1Matlab introduction lecture 1
Matlab introduction lecture 1
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Matlab simulink introduction
Matlab simulink introductionMatlab simulink introduction
Matlab simulink introduction
 
Fundamentals of matlab
Fundamentals of matlabFundamentals of matlab
Fundamentals of matlab
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Differential evolution optimization technique
Differential evolution optimization techniqueDifferential evolution optimization technique
Differential evolution optimization technique
 
Matlab day 1: Introduction to MATLAB
Matlab day 1: Introduction to MATLABMatlab day 1: Introduction to MATLAB
Matlab day 1: Introduction to MATLAB
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
Introduction to simulink (1)
Introduction to simulink (1)Introduction to simulink (1)
Introduction to simulink (1)
 
MATLAB - Arrays and Matrices
MATLAB - Arrays and MatricesMATLAB - Arrays and Matrices
MATLAB - Arrays and Matrices
 
Presentation on LabVIEW Basics
Presentation on LabVIEW BasicsPresentation on LabVIEW Basics
Presentation on LabVIEW Basics
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 

Andere mochten auch

Zotero and You, or Bibliography on the Semantic Web
Zotero and You, or Bibliography on the Semantic WebZotero and You, or Bibliography on the Semantic Web
Zotero and You, or Bibliography on the Semantic Webeby
 
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
cv-sayed-electric engineer
cv-sayed-electric engineercv-sayed-electric engineer
cv-sayed-electric engineersayed rayan
 
Matlab HTI summer training course_Lecture2
Matlab HTI summer training course_Lecture2Matlab HTI summer training course_Lecture2
Matlab HTI summer training course_Lecture2Mohamed Awni
 
IEEE REAL TIME MATLAP COMMUNICATION PROJECTS
IEEE REAL TIME MATLAP COMMUNICATION PROJECTSIEEE REAL TIME MATLAP COMMUNICATION PROJECTS
IEEE REAL TIME MATLAP COMMUNICATION PROJECTStema_solution
 
mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learnpavan373
 
PLL & DLL DESIGN IN SIMULINK MATLAB
PLL & DLL DESIGN IN SIMULINK MATLABPLL & DLL DESIGN IN SIMULINK MATLAB
PLL & DLL DESIGN IN SIMULINK MATLABkartik pal
 
Chemical process control a first course with matlab p.c. chau
Chemical process control a first course with matlab   p.c. chauChemical process control a first course with matlab   p.c. chau
Chemical process control a first course with matlab p.c. chaushubham kumar
 
The valuation of long-term securities
The valuation of long-term securitiesThe valuation of long-term securities
The valuation of long-term securitiesZubair Arshad
 

Andere mochten auch (19)

Zotero and You, or Bibliography on the Semantic Web
Zotero and You, or Bibliography on the Semantic WebZotero and You, or Bibliography on the Semantic Web
Zotero and You, or Bibliography on the Semantic Web
 
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
cv-sayed-electric engineer
cv-sayed-electric engineercv-sayed-electric engineer
cv-sayed-electric engineer
 
Matlab HTI summer training course_Lecture2
Matlab HTI summer training course_Lecture2Matlab HTI summer training course_Lecture2
Matlab HTI summer training course_Lecture2
 
2
22
2
 
IEEE REAL TIME MATLAP COMMUNICATION PROJECTS
IEEE REAL TIME MATLAP COMMUNICATION PROJECTSIEEE REAL TIME MATLAP COMMUNICATION PROJECTS
IEEE REAL TIME MATLAP COMMUNICATION PROJECTS
 
My c.v.
My c.v.My c.v.
My c.v.
 
Perez cante edgar fuzzy
Perez cante edgar   fuzzyPerez cante edgar   fuzzy
Perez cante edgar fuzzy
 
SalahBedeiwiResume
SalahBedeiwiResumeSalahBedeiwiResume
SalahBedeiwiResume
 
Fundamentals of matlab programming
Fundamentals of matlab programmingFundamentals of matlab programming
Fundamentals of matlab programming
 
Sheet 1
Sheet 1Sheet 1
Sheet 1
 
Matlab
MatlabMatlab
Matlab
 
mat lab introduction and basics to learn
mat lab introduction and basics to learnmat lab introduction and basics to learn
mat lab introduction and basics to learn
 
PLL & DLL DESIGN IN SIMULINK MATLAB
PLL & DLL DESIGN IN SIMULINK MATLABPLL & DLL DESIGN IN SIMULINK MATLAB
PLL & DLL DESIGN IN SIMULINK MATLAB
 
Chemical process control a first course with matlab p.c. chau
Chemical process control a first course with matlab   p.c. chauChemical process control a first course with matlab   p.c. chau
Chemical process control a first course with matlab p.c. chau
 
Hana CV
Hana CVHana CV
Hana CV
 
Mohamed Mahdly CV
Mohamed  Mahdly CVMohamed  Mahdly CV
Mohamed Mahdly CV
 
The valuation of long-term securities
The valuation of long-term securitiesThe valuation of long-term securities
The valuation of long-term securities
 
Matlab isim link
Matlab isim linkMatlab isim link
Matlab isim link
 

Ähnlich wie Introduction to matlab lecture 1 of 4

Ähnlich wie Introduction to matlab lecture 1 of 4 (20)

Introduction to Matlab.ppt
Introduction to Matlab.pptIntroduction to Matlab.ppt
Introduction to Matlab.ppt
 
matlab-130408153714-phpapp02_lab123.ppsx
matlab-130408153714-phpapp02_lab123.ppsxmatlab-130408153714-phpapp02_lab123.ppsx
matlab-130408153714-phpapp02_lab123.ppsx
 
Matlab basic and image
Matlab basic and imageMatlab basic and image
Matlab basic and image
 
Matlab anilkumar
Matlab  anilkumarMatlab  anilkumar
Matlab anilkumar
 
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptxMATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
MATLAB Workshop yugjjnhhasfhlhhlllhl.pptx
 
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
 
Brief Introduction to Matlab
Brief  Introduction to MatlabBrief  Introduction to Matlab
Brief Introduction to Matlab
 
EE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manualEE6711 Power System Simulation Lab manual
EE6711 Power System Simulation Lab manual
 
Matlab tut2
Matlab tut2Matlab tut2
Matlab tut2
 
MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
Matlab summary
Matlab summaryMatlab summary
Matlab summary
 
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
 
Matlab
MatlabMatlab
Matlab
 
Matlab1
Matlab1Matlab1
Matlab1
 
Matlab
MatlabMatlab
Matlab
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 
Basic matlab for beginners
Basic matlab for beginnersBasic matlab for beginners
Basic matlab for beginners
 
Seminar on MATLAB
Seminar on MATLABSeminar on MATLAB
Seminar on MATLAB
 

Mehr von Randa Elanwar

الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةRanda Elanwar
 
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص )_Pdf5of5
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص    )_Pdf5of5تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص    )_Pdf5of5
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص )_Pdf5of5Randa Elanwar
 
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة والأخطاء ال...
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة  والأخطاء ال...تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة  والأخطاء ال...
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة والأخطاء ال...Randa Elanwar
 
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد )_Pdf3of5
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد   )_Pdf3of5تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد   )_Pdf3of5
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد )_Pdf3of5Randa Elanwar
 
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية )_Pdf2of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية  )_Pdf2of5تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية  )_Pdf2of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية )_Pdf2of5Randa Elanwar
 
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5Randa Elanwar
 
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونين
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونينتعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونين
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونينRanda Elanwar
 
Entrepreneurship_who_is_your_customer_(arabic)_7of7
Entrepreneurship_who_is_your_customer_(arabic)_7of7Entrepreneurship_who_is_your_customer_(arabic)_7of7
Entrepreneurship_who_is_your_customer_(arabic)_7of7Randa Elanwar
 
Entrepreneurship_who_is_your_customer_(arabic)_5of7
Entrepreneurship_who_is_your_customer_(arabic)_5of7Entrepreneurship_who_is_your_customer_(arabic)_5of7
Entrepreneurship_who_is_your_customer_(arabic)_5of7Randa Elanwar
 
Entrepreneurship_who_is_your_customer_(arabic)_4of7
Entrepreneurship_who_is_your_customer_(arabic)_4of7Entrepreneurship_who_is_your_customer_(arabic)_4of7
Entrepreneurship_who_is_your_customer_(arabic)_4of7Randa Elanwar
 
Entrepreneurship_who_is_your_customer_(arabic)_2of7
Entrepreneurship_who_is_your_customer_(arabic)_2of7Entrepreneurship_who_is_your_customer_(arabic)_2of7
Entrepreneurship_who_is_your_customer_(arabic)_2of7Randa Elanwar
 
يوميات طالب بدرجة مشرف (Part 19 of 20)
يوميات طالب بدرجة مشرف (Part 19 of 20)يوميات طالب بدرجة مشرف (Part 19 of 20)
يوميات طالب بدرجة مشرف (Part 19 of 20)Randa Elanwar
 
يوميات طالب بدرجة مشرف (Part 18 of 20)
يوميات طالب بدرجة مشرف (Part 18 of 20)يوميات طالب بدرجة مشرف (Part 18 of 20)
يوميات طالب بدرجة مشرف (Part 18 of 20)Randa Elanwar
 
يوميات طالب بدرجة مشرف (Part 17 of 20)
يوميات طالب بدرجة مشرف (Part 17 of 20)يوميات طالب بدرجة مشرف (Part 17 of 20)
يوميات طالب بدرجة مشرف (Part 17 of 20)Randa Elanwar
 
يوميات طالب بدرجة مشرف (Part 16 of 20)
يوميات طالب بدرجة مشرف (Part 16 of 20)يوميات طالب بدرجة مشرف (Part 16 of 20)
يوميات طالب بدرجة مشرف (Part 16 of 20)Randa Elanwar
 
يوميات طالب بدرجة مشرف (Part 15 of 20)
يوميات طالب بدرجة مشرف (Part 15 of 20)يوميات طالب بدرجة مشرف (Part 15 of 20)
يوميات طالب بدرجة مشرف (Part 15 of 20)Randa Elanwar
 

Mehr von Randa Elanwar (20)

الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الخامس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الرابع ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثالث ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الثاني ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء الأول ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
 
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص )_Pdf5of5
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص    )_Pdf5of5تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص    )_Pdf5of5
تدريب مدونة علماء مصر على الكتابة الفنية (الترجمة والتلخيص )_Pdf5of5
 
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة والأخطاء ال...
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة  والأخطاء ال...تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة  والأخطاء ال...
تدريب مدونة علماء مصر على الكتابة الفنية (القصة القصيرة والخاطرة والأخطاء ال...
 
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد )_Pdf3of5
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد   )_Pdf3of5تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد   )_Pdf3of5
تدريب مدونة علماء مصر على الكتابة الفنية (مقالات الموارد )_Pdf3of5
 
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية )_Pdf2of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية  )_Pdf2of5تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية  )_Pdf2of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات الإخبارية )_Pdf2of5
 
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5
تدريب مدونة علماء مصر على الكتابة الفنية (المقالات المبنية على البحث )_Pdf1of5
 
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونين
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونينتعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونين
تعريف بمدونة علماء مصر ومحاور التدريب على الكتابة للمدونين
 
Entrepreneurship_who_is_your_customer_(arabic)_7of7
Entrepreneurship_who_is_your_customer_(arabic)_7of7Entrepreneurship_who_is_your_customer_(arabic)_7of7
Entrepreneurship_who_is_your_customer_(arabic)_7of7
 
Entrepreneurship_who_is_your_customer_(arabic)_5of7
Entrepreneurship_who_is_your_customer_(arabic)_5of7Entrepreneurship_who_is_your_customer_(arabic)_5of7
Entrepreneurship_who_is_your_customer_(arabic)_5of7
 
Entrepreneurship_who_is_your_customer_(arabic)_4of7
Entrepreneurship_who_is_your_customer_(arabic)_4of7Entrepreneurship_who_is_your_customer_(arabic)_4of7
Entrepreneurship_who_is_your_customer_(arabic)_4of7
 
Entrepreneurship_who_is_your_customer_(arabic)_2of7
Entrepreneurship_who_is_your_customer_(arabic)_2of7Entrepreneurship_who_is_your_customer_(arabic)_2of7
Entrepreneurship_who_is_your_customer_(arabic)_2of7
 
يوميات طالب بدرجة مشرف (Part 19 of 20)
يوميات طالب بدرجة مشرف (Part 19 of 20)يوميات طالب بدرجة مشرف (Part 19 of 20)
يوميات طالب بدرجة مشرف (Part 19 of 20)
 
يوميات طالب بدرجة مشرف (Part 18 of 20)
يوميات طالب بدرجة مشرف (Part 18 of 20)يوميات طالب بدرجة مشرف (Part 18 of 20)
يوميات طالب بدرجة مشرف (Part 18 of 20)
 
يوميات طالب بدرجة مشرف (Part 17 of 20)
يوميات طالب بدرجة مشرف (Part 17 of 20)يوميات طالب بدرجة مشرف (Part 17 of 20)
يوميات طالب بدرجة مشرف (Part 17 of 20)
 
يوميات طالب بدرجة مشرف (Part 16 of 20)
يوميات طالب بدرجة مشرف (Part 16 of 20)يوميات طالب بدرجة مشرف (Part 16 of 20)
يوميات طالب بدرجة مشرف (Part 16 of 20)
 
يوميات طالب بدرجة مشرف (Part 15 of 20)
يوميات طالب بدرجة مشرف (Part 15 of 20)يوميات طالب بدرجة مشرف (Part 15 of 20)
يوميات طالب بدرجة مشرف (Part 15 of 20)
 

Kürzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxdhanalakshmis0310
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
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
 
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
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
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
 
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
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
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
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 

Kürzlich hochgeladen (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.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Ữ Â...
 
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
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
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
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
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
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

Introduction to matlab lecture 1 of 4

  • 1.
  • 2.  This course will: › Introduce the basic functionality of MATLAB › Demonstrate its utility in scientific research › Identify interesting concepts and useful techniques in scientific computing By the end of the course, you should have the skills necessary to apply MATLAB to your research and learn how to extend its capabilities 2
  • 3.  Introduction: What is Matlab, History of Matlab, strengths, weakness  Getting familiar with the interface: Layout, Pull down menus  Creating and manipulating objects: Variables (scalars, vectors, matrices, text strings), Operators (arithmetic, relational, logical) and built-in functions  Flow control: Conditional and iteration blocks  Data transport: Importing into/Exporting from the workspace  Plotting with Matlab  M-files and UserDefined functions 3
  • 4.  Introduction: › What is Matlab, › History of Matlab, › strengths, weakness  Getting familiar with the interface: › Layout, › Pull down menus  Creating and manipulating variables
  • 5.  MATLAB is a program for doing numerical computation.  It was originally designed for solving linear algebra type problems using matrices.  Its name is derived from MATrix LABoratory 5
  • 6.  MATLAB has since been expanded and now has built-in functions for solving problems requiring › data analysis, › signal processing, › optimization, › and several other types of scientific computations.  It also contains functions for 2-D and 3-D graphics and animation. 6
  • 7.  Application kernel, e.g., matlab-7.7  Computational engine  Built-in low level algorithms (no source code)  Includes a variety of graphical capabilities  Suite with contemporary releases, e.g. R2008b  Programming language  Designed to solve problems numerically (Particularly good for matrix operations)  Easy to learn and use (Simplier syntax rules than Fortran or C) 7
  • 8.  Auxiliaries – usually bundled with kernel › Simulink (dynamic systems modeling) › Stateflow (event and logic-driven modeling)  Toolboxes - designed for specific applications › Specialized collections of MATLAB source files  Developed or supported by MathWorks Inc. Signal Processing, Optimization, Control System, etc.  Downloadable third party freeware Multiple precision arithmetic, robotics, etc. Resource: http://www.mathworks.com/matlabcentral/ 8
  • 9.  Originally written in Fortran › Author: Cleve Moler, Univ. of New Mexico  Mathworks, Inc. founded to further develop it. › Incorporated in 1984 › Core is written in C › Graphical interface is written in Java › Runs on many platforms  Unix – Solaris, SGI, AIX, Digital Unix  Linux  Windows  Mac OS 9
  • 10.  MATLAB is relatively easy to learn  MATLAB code is optimized to be relatively quick when performing matrix operations  MATLAB may behave like a calculator or as a programming language  MATLAB is interpreted, errors are easier to fix  Although primarily procedural, MATLAB does have some object-oriented elements 10
  • 11.  MATLAB is NOT a general purpose programming language  MATLAB is an interpreted language (making it for the most part slower than a compiled language such as C++)  MATLAB is designed for scientific computation and is not suitable for some things (such as parsing text) 11
  • 12.  Command window: Type your instructions here and press ENTER to execute them. 12
  • 13.  The MATLAB environment is command oriented somewhat like UNIX.  A prompt (>>) appears on the screen and a MATLAB statement can be entered. When the <ENTER> key is pressed, the statement is executed, and another prompt appears.  If a statement is terminated with a semicolon ( ; ), no results will be displayed. Otherwise results will appear before the next prompt. 13
  • 14.  Example 14 » a=5; » b=a/2 b = 2.5000 »
  • 15.  Command history: a list of instructions executed by MATLAB is shown here.  Workspace: shows a list of variables created by MATLAB. As you can see, the value of ‘A’ is shown. 15
  • 16. 16
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. 23
  • 24.  Help › Launch Matlab Help Window  Help > Product Help > MATLAB › See Demos  Help > Demos  Or Type help at the Matlab prompt or help followed by a function name for help on a specific function  Online: › Online documentation for Matlab at the MathWorks website http://www.mathworks.com/access/helpdesk/help/techdo c/matlab.html › There are also numerous tutorials online that are easily found with a web search. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28.  “%” is the neglect sign for Matlab (equaivalent of “//” in C). Anything after it on the same line is neglected by Matlab compiler.  Sometimes slowing down the execution is done deliberately for observation purposes. You can use the command “pause” for this purpose 28
  • 29.  >> clear % clears all objects in workspace  >> clear x y % clears values of objects x and y  >> clc % clears command window scroll buffer  >> which <filename> % finds first occurrence in search path  >> who % lists all objects in the workspace  >> <command> ; % semicolon → % execute, no display in command window 29
  • 30.  >> <control> c % stops program execution  >> <control> q % stops execution and exits Matlab  >> <begin command text > … % three dots → continue to next line  >> whos % List known variables plus their size  >> help sqrt % Help on using sqrt  >> lookfor sqrt % Search for keyword sqrt in on MATLABPATH.  >> what ('directory') % List MATLAB files in directory 30
  • 31.  >> dir %List all files in current directory  >> ls % Same as dir  >> type test %Display the content of test.m in command window  >> delete test % Delete test.m  >> cd a: % Change directory to a:  >> chdir a: % Same as cd  >> pwd % Show current directory  >> which test % Display directory path to ‘closest’ test.m 31
  • 32.  Top navigation bar with pull-down menus  File  Edit  Debug  Desktop  Window  Help  Toolbar with icons  Current Directory path identified 32
  • 33.  File › New (create new m-file, figure, variable) › Import Data › Set Path (folders, directories to search) › Preferences > Command Window (number format, scroll buffer size)  Edit › Find, Delete, Copy, Paste, etc. 33
  • 34.  Desktop › Choose layout for display of windows  Original on launch  Desktop > Save Layout (if you like it) with a name  Modify original if desired  Desktop > Save Layout (if you like it) with a name  Default layout (new in R2008b)  You can always start over from this configuration  Desktop > Desktop Layout > Default 34
  • 35.  Numerical values › Sequence of base 10 digits  Binary, hex representations are character strings › Period as radix point for floating point numbers › Lower case e for power of 10 exponent  Example: >> x = 123.456e-07 → x = 0.0000123456 [ not (123.456)*(2.71828,,,)-7 ] 35
  • 36.  Complex numbers › i and j initially set to the square root of -1 Imaginary part has i or j appended (1+1i) is a single complex number object (1+1*i) is a sum of one and current value of i 36
  • 37.  Matrices › Rectangular arrays of elements  Indexed by row, then by column Example: >> A = [ a(1,1) a(1,2); a(2,1) a(2,2)] 37
  • 38.  Boolean logicals (Bernoulli variables) › Truth Values  1 for true;  0 for false › Primary logic symbols  & logical AND  == logical equal  | logical inclusive OR  ~ logical NOT › Compound logic symbols  < Less Than  <= Less Than or Equal  > Greater Than  >= Greater Than or Equal  == Equal To  ~= Not Equal To 38
  • 39.  MATLAB also supports some logical functions. › any(x) returns 1 if any element of x is nonzero › all(x) returns 1 if all elements of x are nonzero › isnan(x) returns 1 at each NaN in x › isinf(x) returns 1 at each infinity in x › finite(x) returns 1 at each finite value in x 39
  • 40.  Separators and delimiters  [ ] square brackets -- vector and matrix delimiters  { } curly brackets -- cell delimiter  ( ) parentheses * Grouping in compound expressions * Vector and matrix element indices * Function argument  : colon -- index range separator  ; semicolon -- matrix row separator  <space> matrix column separator  , comma -- matrix index, function argument separator, row vector element separator  ' ' single quotes -- demarcation of character strings 40
  • 42.  Have not to be previously declared type in a variable name and type in its value.  MATLAB will decide on the data type automatically, so you don’t have to declare its data type.  Variable names can contain up to 63 characters  Variable names must start with a letter followed by letters, digits, and underscores.  Variable names are case sensitive 42
  • 43.  Example of illegal variable names: 43
  • 44.  Matlab Special Variables  ans Default variable name for results  pi Value of π  eps Smallest incremental number  inf Infinity  NaN Not a number e.g. 0/0  realmin The smallest usable positive real number  realmax The largest usable positive real number 44
  • 45.  Assignment = a = b (assign b to a)  Addition + a + b  Subtraction - a -b  Multiplication * or.* a*b or a.*b  Division / or ./ a/b or a./b  Power ^ or .^ a^b or a.^b 45
  • 46.  Type the following expressions into MATLAB at the command window, and observe the results: 1. >> for = 5 2. >> else =6 3. >> cos = 3; >> cos(0) 4. >> A = [1,2,3]; >> sum(A) >> sum = 7; >> sum(A)
  • 47.  Type the following expressions into MATLAB at the command window, and observe the results: 5. >> 5>2 6. >> 5<4 7. >> 1.5<=1.5 8. >> 2>=pi 9. >> 1.8==1.801 10. >> 1.8~=2 11. >> 1.8==1.80000000000000000000000001 (see what happen)