Appendix

MATLAB® characters, operators, and commands

Table A1

Operators of scalar, array and matrix arithmetic

OperatorDescriptionLocation, page
+Addition, scalar and matrix12, 32
Subtraction, scalar and matrix12, 32
*Multiplication, scalar and matrix12, 33
.*Multiplication, element-wise36
/Right division, scalar and matrix12, 35
./Right division, element-wise36
Left division, scalar and matrix12, 35
.Left division, element-wise36
^Exponentiation, scalar and matrix2
.^Exponentiation, element-wise36

Table A2

Special characters

CharacterDescriptionLocation, page
=Assignment14
%Percent; is used for comments and for output format specification11, 22
( )Parentheses; is used for input arguments and in matrix addressing11, 30
No.CommandDescriptionLocation, page
[ ]Brackets; use for input of the vector, matrix, and array elements27
(space)Space; separates elements into arrays, and adds into output specifications23, 27
:Colon; creates vectors, used also for loops iterations and for selecting all array elements28, 30, 57
,Comma; separates elements into arrays and commands on the same line11, 27
;Semicolon; suppresses printing if written after the command. Separates matrix rows and commands on the same line11, 27
. . .Ellipsis; signs that a long statement to be continued on the next line11
,Apostrophe; array or matrix transpose quotation mark; is used for a text string generation22, 31, 43

t0020

Table A3

Relational and logical operators

OperatorDescriptionLocation, page
= =Equal; element-wise51
>Greater than; element-wise51
> =Greater than or equal to; element-wise51
<Less than; element-wise51
&Logical AND53
~=Not equal; element-wise51
1Logical OR53
<=Lower than or equal to; element-wise51
~Logical NOT53

Table A4

Alphabetical list of commands and predefined variables

No.CommandDescriptionLocation, page
1absAbsolute value12
2acosInverse cosine for angle in radians13
3acosdInverse cosine for angle in degrees14
4acotInverse cotangent for angle in radians14
5acotdInverse cotangent for angle in degrees14
6addtodateAdds quantity to a date43
7andLogical AND53
8ansLast calculated or defined value14
9asinInverse sine for angle in radians13
10asindInverse sine for angle in degrees13
11atanInverse tangent for angle in radians14
12atandInverse tangent for angle in degrees14
13axisControls axis scaling and appearance77
14barDraws a vertical bar on the plot105
15barhDraws a horizontal bar on the plot106
16bar3Generates 3D vertical bars on the plot106
17box on/offDraws/removes box on the axes103
18boxplotGenerates box-whiskers plot137
19capaplotGenerates capability plot139
20cdfThe cdf for a specified distribution125
21chi2gofChi-square goodness-of-fit test198
22clabelLabels iso-level lines104
23clcClear the command window11
24clearRemove variables from the Workspace20
25closeCloses one or more Figure Windows71
26colormapSets colors88
27contourCreates a 2D-contour plot104
28contour3Creates a 3D-contour plot105
29controlchartGenerates control (Shewhart) chart141
30cosCosine for angle in radians13
31cosdCosine for angle in degrees13
32cotCotangent for angle in radians13
33cotdCotangent for angle in degrees13
34cumsumCumulative sum of elements42
35cylinderGenerates a cylinder103
36dateGenerates a string with current date43
37datenumConverts date string to the serial number43
38datestrConverts serial date number to the string42
39detCalculates a determinant42
40dfittollInterface for displaying fit distributions180
41diagCreates a diagonal matrix from a vector41
42diffCalculates a difference, approximates a derivative172
43dispDisplay output21
44disttoolCreates interactive plots of probability distributions142
45docDisplays HTML documentation in the Help Window17
46else, elseifIs used with if; conditionally executes if statement condition56
47endTerminates scope of for, while, if statements, or serves as last index29, 56
48erfError function14
49errorbarCreates a plot with error bounded points96
50expExponential12
51eyeCreates a unit matrix41
52factorialCalculates factorial of positive integer n13
53figureCreates the Figure Window100
54findFinds indices of certain elements of array53
55floorRound off toward minus infinity13
56forIs used to repeat execution of command/s57
57formatSets current output format20
58fplotCreates a 2D plot of a function100
59fprintfDisplays formatted output22, 44
60functionCreates a new function160
61fzeroSolves a one-variable equation166
62gammaGamma function14
63globalDeclares a global variable162
64gridAdds grid lines76
65gscatterCreates scatter plot with grouping variable143
66gtextAdds a text with the help of the mouse78
67helpDisplays explanations in the Command Window16
68help graph2dDisplays list of 2D graph commands99
69help graph3dDisplays list of 3D graph commands99
70help specgraphDisplays list of specialized graph commands99
71histPlots a histogram94
72hist3Generates 3D histogram of bivariate data107
73hold on/offKeeps current graph open, ends hold on72
74i1si1_e20
75icdfInverse cumulative distribution function, specified distribution125
76ifConditionally execute56
77infInfinity, is produced by dividing by 019
78inputPrompt to user input158
79interp1One-dimensional interpolation164
80invCalculates the inverse matrix35
81jThe same as i20
82jbtestJarque-Bera hypothesis test198
83kstestKolmogorov-Smirnov goodness-of-fit hypothesis test, single sample199
84kstest2Kolmogorov-Smirnov goodness-of-fit hypothesis test, two samples199
85legendAdds a legend to the plot80
86lengthNumber of elements in vector40
87loadLoad data stored in the mat-file197
88lillietestLilliefors' goodness-of-fit hypothesis test200
89linspaceGenerates a linearly spaced vector29
90logNatural logarithm12
91log10Decimal logarithm12
92loglogGenerates a 2D plot with log axes102
93lookforSearch for the word in the all help entries16
94maxReturns maximal value41
95meanCalculates mean value41
96medianCalculates median value42
97meshCreates a 3D plot with meshed surface86
98meshgridCreates X,Y matrices for further plotting85
99minReturns minimal value41
100NaNNot a number20
101n. . .fitFits data for the given distribution178
102n. . .pdfCalculates pdf for the given distribution129
103n. . .cdfCalculates cdf for the given distribution129
104n. . .invInverse cdf for the given distribution130
105n. . .randGenerates pseudorandom numbers for the given distribution130
106n. . .statCalculates mean and variance for the given distribution130
107normcdfNormal cumulative distribution function124
108norminvInverse of the normal cdf124
109normpdfNormal probability density function124
110normplotGenerates normal probability plot144
111normspecPlots normal density between specification limits144
112notLogical NOT53
113num2strConverts numbers to a string43
114ode. . .ODE solver command, general form211
115ode113Solves non-stiff ODEs209
116ode15iSolves implicit ODEs209
117ode15sSolves stiff ODEs209, 211
118ode23Solves non-stiff ODEs209
119ode23sSolves stiff ODEs209
120ode23tSolves stiff ODEs209
121ode23tbSolves stiff ODEs209
122ode45Solves non-stiff ODEs209, 211
123onesCreates an array with ones38
124orLogical OR53
125paretoGenerates Pareto chart95
126pdfThe pdf for a specified distribution125
127piNumber π12
128pieCreates a 2D pie plot109
129pie3Creates a 3D pie plot109
130plotCreates a 3D line plot68
131plot3Creates a 3D plot with points and/or lines82
132polarCreates a 2D plot in polar coodinates101
133polyfitFits the data by a polynomial175
134polyvalEvaluates the polynomial value175
135probplotGenerates a comparative normal distribution plot143
136quadNumerical integration, Simpson's rule168
137randGenerates uniformly distributed random numbers38
138randiGenerates integer random numbers from uniform discrete distribution39, 41
139randnGenerates normally distributed numbers38
140randomGenerates random numbers for given distribution128
141randtoolOpens GUI for the random numbers142
142ranksumWilcoxon rank sum test, equal medians195
143repmatDuplicates a matrix40
144reshapeChanges size of a matrix40
145rngControls random number generators39
146rotate3d on/offInteractively rotates/stops rotation of a 3D plot93
147roundRound off toward nearest integer13
148sampsizepwrCalculates sample size and power for hypothesis test196
149scatterGenerates a 2D scatter plot98
150semilogyCreates a 2D plot with log-scaled y-axis101
151signrankWilcoxon signed rank test, zero median200
152sinSine for angle in radians13
153sindSine for angle in degrees13
154sizeSize of array/matrix40
155sortArranges elements in ascending or descending order42
156sphereGenerates a sphere plot102
157sqrtSquare root12
158stairsCreates star-like plot108
159stdCalculates standard deviation42
160stemCreates a 2D stem plot107
161stem3Creates a 3D stem plot108
162strvcatConcatenates strings vertically41
163subplotPlaces multiple plots on the same page73
164sumCalculates sum of elements42
165surfCreates a 3D surface plot86
166surfcGenerates surface and counter plots together105
167tanTangent for angle in radians13
168tandTangent for angle in degrees13
169textAdds a text to the plot78
170titleAdds a caption to the plot77
171transpose (’)Transposes elements of an array31
172trapzNumerical integration with the trapezoidal rule170
173ttestOne- and paired-sample t-test201
174ttest 2Two-samples test201
175tinvinverse cdf of Students' t181
176verDisplays versions of the MATLAB products18
177viewSpecifies a viewpoint for 3D graph89
178whileRepeats execution of command/s57
179whoDisplays variables stored in the Workspace20
180whosDisplays Workspace variables and additional information about the variables20
181xlabelAdds a label to x-axis77
182ylabelAdds a label to y-axis77
183zerosCreates an array with zeros38
184zlabelAdds a label to z-axis83
185ztestOne-sample Z-test201

t0040_at0040_bt0040_ct0040_d

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.95.150