SlideShare ist ein Scribd-Unternehmen logo
1 von 35
>> A = 0:2:10
A =
0 2 4 6 8 10
>> B(1:6) = 2.5
B =
2.5000 2.5000 2.5000 2.5000 2.5000 2.5000
>> C = A+B
C =
2.5000 4.5000 6.5000 8.5000 10.5000 12.5000
>> D = A.*B
D =
0 5 10 15 20 25
>> A(1,3) = 8
A =
0 2 8 6 8 10
>> E = A./B
E =
0 0.8000 3.2000 2.4000 3.2000 4.0000
2
>> sum(A)
ans =
12.1000
>> mean(A)
ans =
2.0167
>> max(A)
ans =
8.9000
>> fix(A)
ans =
1 2 8 -8 4 3
3
 >> A(:,6) = 0.7
A =
1.0000 2.7000 8.9000 -8.0000 4.0000 0.7000
6.5000 8.9000 5.0000 -0.9000 3.0000 0.7000
 >> A = A(:,[1 3 4 5 6])
A =
1.0000 8.9000 -8.0000 4.0000 0.7000
6.5000 5.0000 -0.9000 3.0000 0.7000
 >> mean(A)
ans =
3.7500 6.9500 -4.4500 3.5000 0.7000
 >> mean(mean(A))
ans =
2.0900
 Matlab string variables
› Operations
› Built-in functions
 Flow control
› Conditional
› Iterations
 Data transport:
› Importing into the workspace
› Exporting from the workspace
5
 MATLAB also can accept and manipulate string
variables.
 A string is defined by enclosing it in single quotes.
 Example: aString = ‘Hello World!’
6
 To convert a
string to
lowercase,
use the lower
command.
 Example:
change string
in matrix A to
lowercase:
 B = lower(A)
7
 To convert a
string to
uppercase,
use the upper
command.
 Example:
change string
in matrix A to
uppercase:
 B = upper(A)
8
 Concatenating
string means
merging two or
more strings
together.
 Example: to
concatenate
str1 and str2:
 newStr =
strcat(str1,str2)
9
 To replace part of
the string with a
new value, use the
strrep command.
 Example: replace
the word ‘lama’
with the word
‘baru’ in the string
str1.
 strrep(str1,’lama’,’
baru’)
10
 Create a vertical
array of strings.
 >> C =
strvcat('Hello','Yes','N
o','Goodbye')
 >> C =
Hello
Yes
No
Goodbye
11
 Detect space characters in
an array
 >> isspace(' Find spa ces ')
 >> Columns 1 through 13
1 1 0 0 0 0 1
0 0 0 1 0 0
Columns 14 through 15
0 1
 Use strfind to find a two-letter pattern in string S:
 >> S = 'Find the starting indices of the pattern string';
 >> strfind(S, 'in')
 >> ans =
2 15 19 45
 >> strfind(S, 'In')
 >> ans =
[]
 >> strfind(S, ' ')
 >> ans =
5 9 18 26 29 33 41
12
 Findstr finds a string within another, longer string: k = findstr(str1,str2)
 The search performed by findstr is case sensitive. Any leading and
trailing blanks in either input string are explicitly included in the
comparison.
 Unlike the strfind function, the order of the input arguments to findstr is
not important. This can be useful if you are not certain which of the two
input strings is the longer one.
 >> s = 'Find the starting indices of the shorter string.';
 >> findstr(s,'the')
 >> ans =
6 30
 >> findstr('the',s)
 >> ans =
6 30
13
 Strmatch finds possible matches for a string
 The statement
 >> x = strmatch('max', strvcat('max', 'minimax',
'maximum'))
 returns x = [1; 3] since rows 1 and 3 begin with 'max'.
 The statement
 >> x = strmatch('max', strvcat('max', 'minimax',
'maximum'),'exact')
 returns x = 1, since only row 1 matches 'max' exactly.
14
 strncmp compares the
first n characters of two
strings
 strncmp is case sensitive.
Any leading and trailing
blanks in either of the strings
are explicitly included in the
comparison.
 strncmp is intended for
comparison of character
data. When used to
compare numeric data,
strncmp returns 0.
 strncmpi compares first
n characters of strings
ignoring case
15
 strtrim removes leading and trailing white-space
from string
 >> str = sprintf(' t Remove leading white-
space')
 >> str =
Remove leading white-space
 >> str = strtrim(str)
 >> str =
Remove leading white-space
16
 str2num used for String to number conversion
 >> str2num('3.14159e0') is approximately .
 To convert a string matrix:
 >> str2num(['1 2';'3 4'])
 >> ans =
1 2
3 4
 num2str used for number to string conversion
17
 int2str used for Integer to string conversion
 >> int2str(2+3) is the string '5'.
 One way to label a plot is:
 >> title(['case number ' int2str(n)])
 For matrix or vector inputs, int2str returns a string matrix:
 >>int2str(eye(3))
 >> ans =
1 0 0
0 1 0
0 0 1
18
 char(X) can be used to convert an array that
contains positive integers representing numeric
codes into a MATLAB character array.
 To print a 3-by-32 display of the printable ASCII
characters:
 >> ascii = char(reshape(32:127,32,3)')
 >> ascii =
! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [  ] ^ _
' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
 double(S) converts the string to its equivalent double-
precision numeric codes.
19
 str=‘012ABCabc’
 num=double(str)=[4
8 49 50 65 66 67
97 98 99]
 char(num) returns
‘012ABCabc’
 Strings also can
undergo arithmetic
operations as they
are dealt by their
ASCII codes
20
If…else Operator
 The if…else
operator tests a
condition.
 If the condition is
true, then execute
the if block.
 If the condition is
false, execute the
else block.
21
if (condition)
% if block
else
% else block
end
% conditions that can be tested
% == : is equal to
% ~= : is not equal to
% > : larger than
% >= : larger than or equal
% <= : less than or equal
% < : less than
Example:
clear, close all
clc
x = 3;
if (x > 5)
disp('The number is more than 5.')
elseif (x == 5)
disp('The number is equal to 5.')
else
disp('The number is less than 5.')
end
22
For loop
 Used to repeat a set of statements multiple
times.
 The for loop format is:
 for(startingvalue:increment:endingvalue)
23
clear, close all
clc
% i is the value of the counter
for i = initial_value:increment:ending_value
% statements in this block will be executed until i
% reaches the ending_value
end
Example:
clear, close all
clc
for i = 1:1:15
st1 = strcat('The value of i
inside the loop is:
',int2str(i));
disp(st1)
end
24
While loop
 Used to repeat a
set of statements
while the tested
condition is true.
 The while loop
format is:
while(condition)
 The tested
condition is the
same as if…else
25
% conditions that can be
tested
% == :is equal to
% ~= :is not equal to
% > :larger than
% >= :larger than or equal
% <= :less than or equal
% < :less than
Example:
clear, close all
clc
counter = 1;
while(counter <= 15)
st1 = strcat('The value of i inside
the loop is: ',int2str(counter));
disp(st1)
counter = counter + 1;
end
26
switch
 switch {expression}
case {value1}
{command1; command2; ...}
case {value2}
{command1; command2; ...}
otherwise
{command1; command2; ...}
end
 expression evaluation can be to numeric or string
 case can be single values or vectors of values
 Execution is terminated after first satisfied expression
27
 File > Import Data % from the navigation bar
 >> uiimport <filename>
Example: >> uiimport planetsize.txt
 >> dlmread('filename', '<delimiter>')
Example: >> planets2 = dlmread('planets2.txt', ';')
 >>load 'filename'
Example: >> load 'planets3.txt'
28
 >> xlsread: Read files from Excel
Example: >> planets6 = xlsread('planets6.xls')
 >> imread: Read graphics file (several formats)
 Example: >> planets7 = imread('planets7.jpg');
 creates the matrix variable planets7
 view with: >> imshow(planets7)
 Other special read functions
› aviread [avi audio/visual files]
› textread [read from text file]
› fscanf [read by format, similar to C language
function]
29
 diary: text file of command window output
>> diary <filename.txt>
….
>> diary off
 save: save workspace objects or text to disk
>> save <filename>
Binary file <filename>.mat
>> save <filename>.txt <variable> –ascii -tabs
Text file <filename>.txt
Matrix column elements separated by tabs with -tabs
30
 Sava data in files:
 >> save myfile VAR1 VAR2 …
or
 >> save(‘myfile’,’VAR1’,’var2’)
 File Formats:
› mat -> Binary MAT-file form
› ascii -> 8-digit ASCII form
› ascii–tabs Delimit array elements with tabs
31
 Read tables of ASCII data with load
 Other functions like textread will read simple
files
 Sometimes, you’ve just got to do it yourself
(Complicated files)
 To read a file manually, open with fopen
› fid=fopen(‘fname’, ‘rt’);
› fid will be <1 if open fails
› File I/O functions accept fid
› Close the file when you’re done with fclose(fid)
32
 A=fscanf(fid,cstring,{N})
› like C’s fscanf, cstring is a C format string:
 ‘%dt%f’--integer (%d),tab(t),double (%f)
 lin=fgetl(fid)
› Reads a single line from the file as text (char
array)
› Process lin with str2num, findstr, sscanf
 Test for end of file with feof(fid);
33
 Save matrices using save fname varname
ascii
 Doing it yourself:
› fid=fopen(‘fname’,’wt’)
› fprintf(fid,cstring, variables)
› Example:
A=[(1:10)’, sin(2*pi*0.1*(1:10)’)];%[integers,
doubles]
fid=fopen(‘example.txt’,’wt’);
fprintf(fid,’%d %fn’,A’);
fclose(fid);
34
 Save some images on your desk with
sequential names:
 E.g. 1.jpg-2.jpg-3.jpg etc
 Im1.tif-Im2.tif-Im3.tif etc
 Image1.bmp-Image2.bmp-Image3.bmp etc
 Write a program to do the following:
1. Compose the image file path
2. Read the image content
3. Find the image mean value
4. Store the means in a text file ‘MEANS.mat’

Weitere ähnliche Inhalte

Was ist angesagt?

Matlab solved problems
Matlab solved problemsMatlab solved problems
Matlab solved problemsMake Mannan
 
INTRODUCTION TO MATLAB session with notes
  INTRODUCTION TO MATLAB   session with  notes  INTRODUCTION TO MATLAB   session with  notes
INTRODUCTION TO MATLAB session with notesInfinity Tech Solutions
 
Introduction to MatLab programming
Introduction to MatLab programmingIntroduction to MatLab programming
Introduction to MatLab programmingDamian T. Gordon
 
MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical ComputingNaveed Rehman
 
Matlab practice
Matlab practiceMatlab practice
Matlab practiceZunAib Ali
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programmingRanjan Pal
 
A complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsA complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsMukesh Kumar
 
Linear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialLinear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialJia-Bin Huang
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentationManchireddy Reddy
 
Matlab Graphics Tutorial
Matlab Graphics TutorialMatlab Graphics Tutorial
Matlab Graphics TutorialCheng-An Yang
 
Writing Fast MATLAB Code
Writing Fast MATLAB CodeWriting Fast MATLAB Code
Writing Fast MATLAB CodeJia-Bin Huang
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMohd Esa
 

Was ist angesagt? (20)

Matlab solved problems
Matlab solved problemsMatlab solved problems
Matlab solved problems
 
INTRODUCTION TO MATLAB session with notes
  INTRODUCTION TO MATLAB   session with  notes  INTRODUCTION TO MATLAB   session with  notes
INTRODUCTION TO MATLAB session with notes
 
Introduction to MatLab programming
Introduction to MatLab programmingIntroduction to MatLab programming
Introduction to MatLab programming
 
MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical Computing
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Matlab practice
Matlab practiceMatlab practice
Matlab practice
 
2D Plot Matlab
2D Plot Matlab2D Plot Matlab
2D Plot Matlab
 
Programming with matlab session 6
Programming with matlab session 6Programming with matlab session 6
Programming with matlab session 6
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programming
 
A complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsA complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projects
 
Linear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorialLinear Algebra and Matlab tutorial
Linear Algebra and Matlab tutorial
 
Matlab commands
Matlab commandsMatlab commands
Matlab commands
 
Matlab1
Matlab1Matlab1
Matlab1
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentation
 
Matlab Graphics Tutorial
Matlab Graphics TutorialMatlab Graphics Tutorial
Matlab Graphics Tutorial
 
Writing Fast MATLAB Code
Writing Fast MATLAB CodeWriting Fast MATLAB Code
Writing Fast MATLAB Code
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
 
Mbd2
Mbd2Mbd2
Mbd2
 
Matlab anilkumar
Matlab  anilkumarMatlab  anilkumar
Matlab anilkumar
 
What is matlab
What is matlabWhat is matlab
What is matlab
 

Andere mochten auch

Digital library construction
Digital library constructionDigital library construction
Digital library constructionRanda Elanwar
 
Communications for Clean Water
Communications for Clean WaterCommunications for Clean Water
Communications for Clean WaterChoose Clean Water
 
Introduction to Neural networks (under graduate course) Lecture 4 of 9
Introduction to Neural networks (under graduate course) Lecture 4 of 9Introduction to Neural networks (under graduate course) Lecture 4 of 9
Introduction to Neural networks (under graduate course) Lecture 4 of 9Randa Elanwar
 
Do Humans Beat Computers At Pattern Recognition
Do Humans Beat Computers At Pattern RecognitionDo Humans Beat Computers At Pattern Recognition
Do Humans Beat Computers At Pattern RecognitionBitdefender
 
Pattern recognition on human vision
Pattern recognition on human visionPattern recognition on human vision
Pattern recognition on human visionGiacomo Veneri
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML
 
What is pattern recognition (lecture 5 of 6)
What is pattern recognition (lecture 5 of 6)What is pattern recognition (lecture 5 of 6)
What is pattern recognition (lecture 5 of 6)Randa Elanwar
 
Earth science 14.1
Earth science 14.1Earth science 14.1
Earth science 14.1Tamara
 
Introduction to Neural networks (under graduate course) Lecture 5 of 9
Introduction to Neural networks (under graduate course) Lecture 5 of 9Introduction to Neural networks (under graduate course) Lecture 5 of 9
Introduction to Neural networks (under graduate course) Lecture 5 of 9Randa Elanwar
 
The Mapping Network Lake Mapping
The Mapping Network Lake MappingThe Mapping Network Lake Mapping
The Mapping Network Lake MappingThe Mapping Network
 
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...Luke Elliott
 
Pattern Recognition and its Application
Pattern Recognition and its ApplicationPattern Recognition and its Application
Pattern Recognition and its ApplicationSajida Mohammad
 
Airborne LiDAR Bathymetry of the Great Barrier Reef
Airborne LiDAR Bathymetry of the Great Barrier ReefAirborne LiDAR Bathymetry of the Great Barrier Reef
Airborne LiDAR Bathymetry of the Great Barrier Reeffungis
 
What is pattern recognition (lecture 3 of 6)
What is pattern recognition (lecture 3 of 6)What is pattern recognition (lecture 3 of 6)
What is pattern recognition (lecture 3 of 6)Randa Elanwar
 
What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)Randa Elanwar
 
Pattern Recognition: digital identity, digital #curation and digital badges (...
Pattern Recognition: digital identity, digital #curation and digital badges (...Pattern Recognition: digital identity, digital #curation and digital badges (...
Pattern Recognition: digital identity, digital #curation and digital badges (...Joyce Seitzinger
 

Andere mochten auch (20)

Digital library construction
Digital library constructionDigital library construction
Digital library construction
 
Communications for Clean Water
Communications for Clean WaterCommunications for Clean Water
Communications for Clean Water
 
Introduction to Neural networks (under graduate course) Lecture 4 of 9
Introduction to Neural networks (under graduate course) Lecture 4 of 9Introduction to Neural networks (under graduate course) Lecture 4 of 9
Introduction to Neural networks (under graduate course) Lecture 4 of 9
 
Icelandic Bathy model
Icelandic Bathy modelIcelandic Bathy model
Icelandic Bathy model
 
Conowingo Presentation- USGS
Conowingo Presentation- USGSConowingo Presentation- USGS
Conowingo Presentation- USGS
 
Do Humans Beat Computers At Pattern Recognition
Do Humans Beat Computers At Pattern RecognitionDo Humans Beat Computers At Pattern Recognition
Do Humans Beat Computers At Pattern Recognition
 
Pattern recognition on human vision
Pattern recognition on human visionPattern recognition on human vision
Pattern recognition on human vision
 
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
RuleML2015: Similarity-Based Strict Equality in a Fully Integrated Fuzzy Logi...
 
What is pattern recognition (lecture 5 of 6)
What is pattern recognition (lecture 5 of 6)What is pattern recognition (lecture 5 of 6)
What is pattern recognition (lecture 5 of 6)
 
Earth science 14.1
Earth science 14.1Earth science 14.1
Earth science 14.1
 
Hydro2016
Hydro2016Hydro2016
Hydro2016
 
Introduction to Neural networks (under graduate course) Lecture 5 of 9
Introduction to Neural networks (under graduate course) Lecture 5 of 9Introduction to Neural networks (under graduate course) Lecture 5 of 9
Introduction to Neural networks (under graduate course) Lecture 5 of 9
 
The Mapping Network Lake Mapping
The Mapping Network Lake MappingThe Mapping Network Lake Mapping
The Mapping Network Lake Mapping
 
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...
The Object Detection Capabilities of the Bathymetry Systems Utilised for the ...
 
Pattern Recognition and its Application
Pattern Recognition and its ApplicationPattern Recognition and its Application
Pattern Recognition and its Application
 
Airborne LiDAR Bathymetry of the Great Barrier Reef
Airborne LiDAR Bathymetry of the Great Barrier ReefAirborne LiDAR Bathymetry of the Great Barrier Reef
Airborne LiDAR Bathymetry of the Great Barrier Reef
 
Hawaii Pacific GIS Conference 2012: 3D GIS - Creating Bathymetry Maps with Co...
Hawaii Pacific GIS Conference 2012: 3D GIS - Creating Bathymetry Maps with Co...Hawaii Pacific GIS Conference 2012: 3D GIS - Creating Bathymetry Maps with Co...
Hawaii Pacific GIS Conference 2012: 3D GIS - Creating Bathymetry Maps with Co...
 
What is pattern recognition (lecture 3 of 6)
What is pattern recognition (lecture 3 of 6)What is pattern recognition (lecture 3 of 6)
What is pattern recognition (lecture 3 of 6)
 
What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)What is pattern recognition (lecture 6 of 6)
What is pattern recognition (lecture 6 of 6)
 
Pattern Recognition: digital identity, digital #curation and digital badges (...
Pattern Recognition: digital identity, digital #curation and digital badges (...Pattern Recognition: digital identity, digital #curation and digital badges (...
Pattern Recognition: digital identity, digital #curation and digital badges (...
 

Ähnlich wie Introduction to matlab lecture 3 of 4

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

Learn Matlab
Learn MatlabLearn Matlab
Learn Matlab
 
bobok
bobokbobok
bobok
 
20100528
2010052820100528
20100528
 
20100528
2010052820100528
20100528
 
Basic R Data Manipulation
Basic R Data ManipulationBasic R Data Manipulation
Basic R Data Manipulation
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
R Programming Homework Help
R Programming Homework HelpR Programming Homework Help
R Programming Homework Help
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
 
BUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdfBUilt in Functions and Simple programs in R.pdf
BUilt in Functions and Simple programs in R.pdf
 
Matlab
MatlabMatlab
Matlab
 
R Programming Intro
R Programming IntroR Programming Intro
R Programming Intro
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
R programming
R programmingR programming
R programming
 
Arrays & Strings.pptx
Arrays & Strings.pptxArrays & Strings.pptx
Arrays & Strings.pptx
 
2- Dimensional Arrays
2- Dimensional Arrays2- Dimensional Arrays
2- Dimensional Arrays
 
Lecture 9_Classes.pptx
Lecture 9_Classes.pptxLecture 9_Classes.pptx
Lecture 9_Classes.pptx
 
Matlab Tutorial
Matlab TutorialMatlab Tutorial
Matlab Tutorial
 
Unit 2
Unit 2Unit 2
Unit 2
 
The Ring programming language version 1.5.3 book - Part 23 of 184
The Ring programming language version 1.5.3 book - Part 23 of 184The Ring programming language version 1.5.3 book - Part 23 of 184
The Ring programming language version 1.5.3 book - Part 23 of 184
 
C (PPS)Programming for problem solving.pptx
C (PPS)Programming for problem solving.pptxC (PPS)Programming for problem solving.pptx
C (PPS)Programming for problem solving.pptx
 

Mehr von Randa Elanwar

الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوةالجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة
الجزء السادس ماذا ستقدم لعميلك ريادة الأعمال خطوة بخطوة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
 

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)
 

Kürzlich hochgeladen

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
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
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
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
 
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
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
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...
 
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Ữ Â...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
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
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
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
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Introduction to matlab lecture 3 of 4

  • 1.
  • 2. >> A = 0:2:10 A = 0 2 4 6 8 10 >> B(1:6) = 2.5 B = 2.5000 2.5000 2.5000 2.5000 2.5000 2.5000 >> C = A+B C = 2.5000 4.5000 6.5000 8.5000 10.5000 12.5000 >> D = A.*B D = 0 5 10 15 20 25 >> A(1,3) = 8 A = 0 2 8 6 8 10 >> E = A./B E = 0 0.8000 3.2000 2.4000 3.2000 4.0000 2
  • 3. >> sum(A) ans = 12.1000 >> mean(A) ans = 2.0167 >> max(A) ans = 8.9000 >> fix(A) ans = 1 2 8 -8 4 3 3
  • 4.  >> A(:,6) = 0.7 A = 1.0000 2.7000 8.9000 -8.0000 4.0000 0.7000 6.5000 8.9000 5.0000 -0.9000 3.0000 0.7000  >> A = A(:,[1 3 4 5 6]) A = 1.0000 8.9000 -8.0000 4.0000 0.7000 6.5000 5.0000 -0.9000 3.0000 0.7000  >> mean(A) ans = 3.7500 6.9500 -4.4500 3.5000 0.7000  >> mean(mean(A)) ans = 2.0900
  • 5.  Matlab string variables › Operations › Built-in functions  Flow control › Conditional › Iterations  Data transport: › Importing into the workspace › Exporting from the workspace 5
  • 6.  MATLAB also can accept and manipulate string variables.  A string is defined by enclosing it in single quotes.  Example: aString = ‘Hello World!’ 6
  • 7.  To convert a string to lowercase, use the lower command.  Example: change string in matrix A to lowercase:  B = lower(A) 7
  • 8.  To convert a string to uppercase, use the upper command.  Example: change string in matrix A to uppercase:  B = upper(A) 8
  • 9.  Concatenating string means merging two or more strings together.  Example: to concatenate str1 and str2:  newStr = strcat(str1,str2) 9
  • 10.  To replace part of the string with a new value, use the strrep command.  Example: replace the word ‘lama’ with the word ‘baru’ in the string str1.  strrep(str1,’lama’,’ baru’) 10
  • 11.  Create a vertical array of strings.  >> C = strvcat('Hello','Yes','N o','Goodbye')  >> C = Hello Yes No Goodbye 11  Detect space characters in an array  >> isspace(' Find spa ces ')  >> Columns 1 through 13 1 1 0 0 0 0 1 0 0 0 1 0 0 Columns 14 through 15 0 1
  • 12.  Use strfind to find a two-letter pattern in string S:  >> S = 'Find the starting indices of the pattern string';  >> strfind(S, 'in')  >> ans = 2 15 19 45  >> strfind(S, 'In')  >> ans = []  >> strfind(S, ' ')  >> ans = 5 9 18 26 29 33 41 12
  • 13.  Findstr finds a string within another, longer string: k = findstr(str1,str2)  The search performed by findstr is case sensitive. Any leading and trailing blanks in either input string are explicitly included in the comparison.  Unlike the strfind function, the order of the input arguments to findstr is not important. This can be useful if you are not certain which of the two input strings is the longer one.  >> s = 'Find the starting indices of the shorter string.';  >> findstr(s,'the')  >> ans = 6 30  >> findstr('the',s)  >> ans = 6 30 13
  • 14.  Strmatch finds possible matches for a string  The statement  >> x = strmatch('max', strvcat('max', 'minimax', 'maximum'))  returns x = [1; 3] since rows 1 and 3 begin with 'max'.  The statement  >> x = strmatch('max', strvcat('max', 'minimax', 'maximum'),'exact')  returns x = 1, since only row 1 matches 'max' exactly. 14
  • 15.  strncmp compares the first n characters of two strings  strncmp is case sensitive. Any leading and trailing blanks in either of the strings are explicitly included in the comparison.  strncmp is intended for comparison of character data. When used to compare numeric data, strncmp returns 0.  strncmpi compares first n characters of strings ignoring case 15
  • 16.  strtrim removes leading and trailing white-space from string  >> str = sprintf(' t Remove leading white- space')  >> str = Remove leading white-space  >> str = strtrim(str)  >> str = Remove leading white-space 16
  • 17.  str2num used for String to number conversion  >> str2num('3.14159e0') is approximately .  To convert a string matrix:  >> str2num(['1 2';'3 4'])  >> ans = 1 2 3 4  num2str used for number to string conversion 17
  • 18.  int2str used for Integer to string conversion  >> int2str(2+3) is the string '5'.  One way to label a plot is:  >> title(['case number ' int2str(n)])  For matrix or vector inputs, int2str returns a string matrix:  >>int2str(eye(3))  >> ans = 1 0 0 0 1 0 0 0 1 18
  • 19.  char(X) can be used to convert an array that contains positive integers representing numeric codes into a MATLAB character array.  To print a 3-by-32 display of the printable ASCII characters:  >> ascii = char(reshape(32:127,32,3)')  >> ascii = ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ' a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  double(S) converts the string to its equivalent double- precision numeric codes. 19
  • 20.  str=‘012ABCabc’  num=double(str)=[4 8 49 50 65 66 67 97 98 99]  char(num) returns ‘012ABCabc’  Strings also can undergo arithmetic operations as they are dealt by their ASCII codes 20
  • 21. If…else Operator  The if…else operator tests a condition.  If the condition is true, then execute the if block.  If the condition is false, execute the else block. 21 if (condition) % if block else % else block end % conditions that can be tested % == : is equal to % ~= : is not equal to % > : larger than % >= : larger than or equal % <= : less than or equal % < : less than
  • 22. Example: clear, close all clc x = 3; if (x > 5) disp('The number is more than 5.') elseif (x == 5) disp('The number is equal to 5.') else disp('The number is less than 5.') end 22
  • 23. For loop  Used to repeat a set of statements multiple times.  The for loop format is:  for(startingvalue:increment:endingvalue) 23 clear, close all clc % i is the value of the counter for i = initial_value:increment:ending_value % statements in this block will be executed until i % reaches the ending_value end
  • 24. Example: clear, close all clc for i = 1:1:15 st1 = strcat('The value of i inside the loop is: ',int2str(i)); disp(st1) end 24
  • 25. While loop  Used to repeat a set of statements while the tested condition is true.  The while loop format is: while(condition)  The tested condition is the same as if…else 25 % conditions that can be tested % == :is equal to % ~= :is not equal to % > :larger than % >= :larger than or equal % <= :less than or equal % < :less than
  • 26. Example: clear, close all clc counter = 1; while(counter <= 15) st1 = strcat('The value of i inside the loop is: ',int2str(counter)); disp(st1) counter = counter + 1; end 26
  • 27. switch  switch {expression} case {value1} {command1; command2; ...} case {value2} {command1; command2; ...} otherwise {command1; command2; ...} end  expression evaluation can be to numeric or string  case can be single values or vectors of values  Execution is terminated after first satisfied expression 27
  • 28.  File > Import Data % from the navigation bar  >> uiimport <filename> Example: >> uiimport planetsize.txt  >> dlmread('filename', '<delimiter>') Example: >> planets2 = dlmread('planets2.txt', ';')  >>load 'filename' Example: >> load 'planets3.txt' 28
  • 29.  >> xlsread: Read files from Excel Example: >> planets6 = xlsread('planets6.xls')  >> imread: Read graphics file (several formats)  Example: >> planets7 = imread('planets7.jpg');  creates the matrix variable planets7  view with: >> imshow(planets7)  Other special read functions › aviread [avi audio/visual files] › textread [read from text file] › fscanf [read by format, similar to C language function] 29
  • 30.  diary: text file of command window output >> diary <filename.txt> …. >> diary off  save: save workspace objects or text to disk >> save <filename> Binary file <filename>.mat >> save <filename>.txt <variable> –ascii -tabs Text file <filename>.txt Matrix column elements separated by tabs with -tabs 30
  • 31.  Sava data in files:  >> save myfile VAR1 VAR2 … or  >> save(‘myfile’,’VAR1’,’var2’)  File Formats: › mat -> Binary MAT-file form › ascii -> 8-digit ASCII form › ascii–tabs Delimit array elements with tabs 31
  • 32.  Read tables of ASCII data with load  Other functions like textread will read simple files  Sometimes, you’ve just got to do it yourself (Complicated files)  To read a file manually, open with fopen › fid=fopen(‘fname’, ‘rt’); › fid will be <1 if open fails › File I/O functions accept fid › Close the file when you’re done with fclose(fid) 32
  • 33.  A=fscanf(fid,cstring,{N}) › like C’s fscanf, cstring is a C format string:  ‘%dt%f’--integer (%d),tab(t),double (%f)  lin=fgetl(fid) › Reads a single line from the file as text (char array) › Process lin with str2num, findstr, sscanf  Test for end of file with feof(fid); 33
  • 34.  Save matrices using save fname varname ascii  Doing it yourself: › fid=fopen(‘fname’,’wt’) › fprintf(fid,cstring, variables) › Example: A=[(1:10)’, sin(2*pi*0.1*(1:10)’)];%[integers, doubles] fid=fopen(‘example.txt’,’wt’); fprintf(fid,’%d %fn’,A’); fclose(fid); 34
  • 35.  Save some images on your desk with sequential names:  E.g. 1.jpg-2.jpg-3.jpg etc  Im1.tif-Im2.tif-Im3.tif etc  Image1.bmp-Image2.bmp-Image3.bmp etc  Write a program to do the following: 1. Compose the image file path 2. Read the image content 3. Find the image mean value 4. Store the means in a text file ‘MEANS.mat’