-
Notifications
You must be signed in to change notification settings - Fork 15
/
commands.tex
694 lines (500 loc) · 17.2 KB
/
commands.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
\documentclass{ximera}
\input{./preamble.tex}
\title{Matlab Commands}
\label{Chap:matlab_commands}
\begin{document}
\begin{abstract}
\end{abstract}
\maketitle
\makeatletter
\newcommand\iflabelexists[2]{%
\@ifundefined{r@#1}{%
}{%
#2
}%
}
\makeatother
{$\dagger$ indicates an {\tt laode} toolbox command not found in \Matlab.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{chap:prelim}{
\subsection*{Chapter~\ref{chap:prelim}: Preliminaries}
\begin{center}
{\bf Editing and Number Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt quit} \index{\computer!quit} \> Ends MATLAB session\\
{\tt ;} \index{\computer!;} \>
(a) At end of line the semicolon suppresses echo printing\\
\> (b) When entering an array the semicolon indicates a new row\\
{\tt $\uparrow$} \index{\computer!$\uparrow$} \>
Displays previous MATLAB command \\
{\tt []} \> Brackets indicating the beginning and the end of a vector or
a matrix\\
{\tt x=y} \> Assigns {\tt x} the value of {\tt y}\\
{\tt x(j)} \> Recalls $j^{th}$ entry of vector $x$\\
{\tt A(i,j)} \> Recalls $i^{th}$ row, $j^{th}$ column of matrix $A$\\
{\tt A(i,:)} \> Recalls $i^{th}$ row of matrix $A$\index{\computer!:}\\
{\tt A(:,j)} \> Recalls $j^{th}$ column of matrix $A$
\end{tabbing}
\begin{center}
{\bf Vector Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt norm(x)} \index{\computer!norm}\> The norm or length of a vector $x$ \\
{\tt dot(x,y)} \index{\computer!dot}\> Computes the dot product of vectors $x$ and $y$ \\
$\dagger${\tt addvec(x,y)} \index{\computer!addvec} \> Graphics display of vector addition in the plane \\
$\dagger${\tt addvec3(x,y)} \index{\computer!addvec3} \> Graphics display of vector addition in three dimensions
\end{tabbing}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt A$'$}\index{\computer!'}\> (Conjugate) transpose of matrix\\
{\tt zeros(m,n)}\index{\computer!zeros} \>
Creates an $m\times n$ matrix all of whose entries equal $0$ \\
{\tt zeros(n)} \> Creates an $n\times n$ matrix all of whose entries equal $0$\\
{\tt diag(x)} \index{\computer!diag}\> Creates an
$n\times n$ diagonal matrix whose diagonal entries
\\ \> are the components of the vector $x\in\R^n$\\
{\tt eye(n)}\index{\computer!eye}\> Creates an $n\times n$ identity matrix
\end{tabbing}
\begin{center}
{\bf Special Numbers in \Matlab}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt pi} \index{\computer!pi}\> The number $\pi=3.1415\ldots$ \\
{\tt acos(a)} \index{\computer!acos}\>
The inverse cosine of the number $a$
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{lineq}{
\subsection*{Chapter~\ref{lineq}: Solving Linear Equations}
\begin{center}
{\bf Editing and Number Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \hspace{1.3in} \= \\
{\tt format} \index{\computer!format} \>
Changes the numbers display format
to standard five digit format \\
\> {\tt format long} \index{\computer!format!long} \>
Changes display format to $15$ digits \\
\> {\tt format rational} \index{\computer!format!rational} \>
Changes display format to rational numbers \\
\> {\tt format short e} \index{\computer!format!e} \>
Changes display to five digit floating point numbers
\end{tabbing}
\begin{center}
{\bf Vector Commands}
\end{center}
\begin{tabbing}
\hspace{1.3in} \= \\
{\tt x.*y} \index{\computer!{\tt .*}}\>
Componentwise multiplication of the vectors {\tt x} and {\tt y}\\
{\tt x./y} \index{\computer!{\tt ./}}\>
Componentwise division of the vectors {\tt x} and {\tt y}\\
{\tt x.\^{}y} \index{\computer!.\^{}}\>
Componentwise exponentiation of the vectors {\tt x} and {\tt y}
\end{tabbing}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.3in} \= \\
{\tt A([i j],:) = A([j i],:)} \> \\
\> Swaps $i^{th}$ and $j^{th}$ rows of matrix $A$ \\
{\tt A$\backslash$b} \index{\computer!$\backslash$} \>
Solves the system of linear equations associated with\\
\> the augmented matrix $(A|b)$ \\
{\tt x = linspace(xmin,xmax,N)} \index{\computer!linspace} \>
\\ \> Generates a vector {\tt x} whose entries are
$N$ equally spaced points \\ \> from {\tt xmin} to {\tt xmax} \\
{\tt x = xmin:xstep:xmax} \> \\ \>
Generates a vector whose entries are
equally spaced points from {\tt xmin} to {\tt xmax} \\
\> with stepsize {\tt xstep}\\
{\tt [x,y] = meshgrid(XMIN:XSTEP:XMAX,YMIN:YSTEP:YMAX);}
\index{\computer!meshgrid} \> \\
\> Generates two vectors $x$ and $y$. The entries of $x$ are values
from {\tt XMIN} to {\tt XMAX} \\
\> in steps of {\tt XSTEP}. Similarly for $y$. \\
{\tt rand(m,n)} \index{\computer!rand} \>
Generates an $m\times n$ matrix whose entries
are randomly and uniformly chosen \\
\> from the interval $[0,1]$ \\
{\tt rref(A)} \index{echelon form}\index{\computer!rref} \>
Returns the reduced row echelon form of the $m\times n$
matrix $A$ \\
%{\tt rrefmovie(A)} \index{echelon form} \>
% Puts the $m\times n$ matrix $A$ into reduced row echelon
%form by showing \\
\> the matrix after each step in the row reduction process \\
{\tt rank(A)} \index{\computer!rank} \>
Returns the rank of the $m\times n$ matrix $A$
\end{tabbing}
\begin{center}
{\bf Graphics Commands}
\end{center}
\begin{tabbing}
\hspace{1.4in} \= \\
{\tt plot(x,y)} \index{\computer!plot} \>
Plots a graph connecting the points $(x(i),y(i))$
in sequence \\
{\tt xlabel('labelx')} \index{\computer!xlabel} \>
Prints {\tt labelx} along the $x$ axis \\
{\tt ylabel('labely')} \index{\computer!ylabel} \>
Prints {\tt labely} along the $y$ axis \\
{\tt surf(x,y,z)} \index{\computer!surf} \>
Plots a three dimensional graph of $z(j)$ as
a function of $x(j)$ and $y(j)$ \\
{\tt hold on} \index{\computer!hold} \>
Instructs MATLAB to {\em add\/} new graphics to the
previous figure \\
{\tt hold off} \>
Instructs MATLAB to {\em clear\/} figure when new graphics
are generated \\
{\tt grid} \index{\computer!grid} \>
Toggles grid lines on a figure \\
{\tt axis('equal')} \index{\computer!axis('equal')} \>
Forces MATLAB to use equal $x$ and $y$
dimensions \\
{\tt view([a b c])} \index{\computer!view} \>
Sets viewpoint from which an observer sees the current 3-D plot \\
{\tt zoom} \index{\computer!zoom} \>
Zoom in and out on 2-D plot. On each mouse click,
axes change by a factor of 2
\end{tabbing}
\begin{center}
{\bf Special Numbers and Functions in \Matlab}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt exp(x)} \index{\computer!exp(1)} \>
The number $e^x$ where $e={\tt exp(1)}=2.7182\ldots$ \\
{\tt sqrt(x)} \index{\computer!sqrt} \>
The number $\sqrt{x}$ \\
{\tt i} \index{\computer!i} \>
The number $\sqrt{-1}$
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{chap:matrices}{
\subsection*{Chapter~\ref{chap:matrices}: Matrices and Linearity}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt A*x} \index{\computer!*} \>
Performs the matrix vector product of the matrix $A$
with the vector $x$ \\
{\tt A*B} \index{\computer!*} \>
Performs the matrix product of the matrices
$A$ and $B$ \\
{\tt size(A)} \index{\computer!size} \>
Determines the numbers of rows and columns of a matrix $A$ \\
{\tt inv(A)} \index{\computer!inv} \>
Computes the inverse of a matrix $A$
\end{tabbing}
\begin{center}
{\bf Program for Matrix Mappings}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
$\dagger${\tt map} \index{\computer!map} \>
Allows the graphic exploration of planar matrix mappings
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{chap:SolveOdes}{
\subsection*{Chapter~\ref{chap:SolveOdes}: Solving Ordinary Differential Equations}
\begin{center}
{\bf Special Functions in \Matlab}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt sin(x)} \index{\computer!sin} \>
The number $\sin(x)$ \\
{\tt cos(x)} \index{\computer!cos} \>
The number $\cos(x)$
\end{tabbing}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt eig(A)} \index{\computer!eig} \>
Computes the eigenvalues of the matrix $A$ \\
{\tt null(A)} \index{\computer!null} \>
Computes the solutions to the homogeneous equation $Ax=0$ \\
\end{tabbing}
\begin{center}
{\bf Programs for the Solution of ODEs}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
$\dagger${\tt pline} \index{\computer!pline} \>
Dynamic illustration of phase line plots for single\\
\> autonomous differential equations \\
$\dagger${\pplane} \index{\computer!\pplane} \>
Displays phase space and time series plots for systems of
autonomous differential equations
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{chap:Planar}{
\subsection*{Chapter~\ref{Chap:Planar}: Closed Form Solutions for Planar ODEs}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt expm(A)} \index{\computer!expm} \>
Computes the matrix exponential of the matrix $A$
\end{tabbing}
\begin{center}
{\bf Functions in \Matlab}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt prod(1:n)} \index{\computer!prod} \>
Computes the product of the integers $1,\ldots,n$
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{C:D&E}{
\subsection*{Chapter~\ref{C:D&E}: Determinants and Eigenvalues}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt det(A)} \index{\computer!det} \>
Computes the determinant of the matrix $A$ \\
{\tt poly(A)} \index{\computer!poly} \>
Returns the characteristic polynomial
of the matrix $A$ \\
{\tt sum(v)} \index{\computer!sum} \>
Computes the sum of the components of the vector $v$ \\
{\tt trace(A)} \index{\computer!trace} \>
Computes the trace of the matrix $A$ \\
{\tt [V,D] = eig(A)} \index{\computer!eig} \>
Computes eigenvectors and eigenvalues of the matrix $A$
\end{tabbing}
}
\iflabelexists{C:LMCC}{
\subsection*{Chapter~\ref{C:LMCC}: Linear Maps and Changes of Coordinates}
\begin{center}
{\bf Vector Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
$\dagger${\tt bcoord} \index{\computer!bcoord} \>
Geometric illustration of planar coordinates
by vector addition \\
$\dagger${\tt ccoord} \index{\computer!ccoord} \>
Geometric illustration of coordinates relative to two bases
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{Chap:LinTrans}{
\subsection*{Chapter~\ref{Chap:LinTrans}: Orthogonality}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.3in} \= \\
{\tt orth(A)} \index{\computer!orth} \>
Computes an orthonormal basis for the column space
of the matrix $A$ \\
{\tt [Q,R] = qr(A,0)} \index{\computer!qr} \>
Computes the $QR$ decomposition of the matrix $A$
\end{tabbing}
\begin{center}
{\bf Graphics Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt axis([xmin,xmax,ymin,ymax])} \index{\computer!axis} \> \\
\> Forces MATLAB to use in a twodimensional plot the intervals \\
\> {\tt [xmin,xmax]} resp.\ {\tt [ymin,ymax]}
labeling the $x$- resp.\ $y$-axis \\
{\tt plot(x,y,'o')} \index{\computer!plot} \>
Same as {\tt plot} but now the points $(x(i),y(i))$
are marked by \\ \> circles and no longer connected in
sequence
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{Chap:NPS}{
\ignore{
\subsection*{Chapter~\ref{C:NPS}: Autonomous Planar Nonlinear Systems}
\begin{center}
{\bf Matrix Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt [V,D] = eig(A)} \index{\computer!eig} \>
Computes eigenvectors and eigenvalues of the
matrix $A$
\end{tabbing}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{C:HDeigenvalues}{
\subsection*{Chapter~\ref{C:HDeigenvalues}: Matrix Normal Forms}
\begin{center}
{\bf Vector Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt real(v)} \index{\computer!real} \>
Returns the vector of the real parts of the components \\
\> of the vector $v$ \\
{\tt imag(v)} \index{\computer!imag} \>
Returns the vector of the imaginary parts of the components \\
\> of the vector $v$
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{C:HDS}{
\subsection*{Chapter~\ref{C:HDS}: Higher Dimensional Systems}
\begin{center}
{\bf Commands for the Solution of Initial Value Problems}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt [t,x]=ode45('fun',[t0 te],x0)} \index{\computer!ode45} \> \\
\> Computes the solution to differential equation with
right hand side {\tt fun} \\
\> on interval {\tt [t0 te]} with the initial
condition {\tt x0} at time {\tt t0} \\
{\tt odeset} \index{\computer!odeset} \>
Displays a list of options that can be used in {\tt ode45}\\
{\tt lorenz} \index{\computer!lorenz} \>
Displays a dynamic simulation of a solution to the Lorenz equations
\end{tabbing}
\begin{center}
{\bf Graphics Commands}
\end{center}
\begin{tabbing}
\hspace{1.4in} \= \\
{\tt subplot(m,n,p)} \index{\computer!subplot} \>
Activates the $p^{th}$ subfigure in a matrix of $m\times n$
subfigures \\
{\tt plot3(x,y,z)} \index{\computer!plot3} \>
Plots curve in three dimensional space connecting \\
\> the points $(x(i),y(i),z(i))$ in sequence \\
{\tt zlabel('labelz')} \index{\computer!zlabel} \>
Prints {\tt labelz} along the $z$ axis \\
{\tt clf} \index{\computer!clf} \>
Clears the previous graphics
\end{tabbing}
\begin{center}
{\bf Special Functions in \Matlab}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt abs(v)} \index{\computer!abs} \>
Computes the absolute value of the components of the vector {\tt v}\\
\> and returns the answer in a vector of the same length
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{C:LDE}{
\subsection*{Chapter~\ref{C:LDE}: Linear Differential Equations}
\begin{center}
{\bf Commands for Polynomials}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt roots(a)} \index{\computer!roots} \>
Computes the roots of the polynomial with coefficients
specified in the vector {\tt a}
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{C:LT}{
\subsection*{Chapter~\ref{C:LT}: Laplace Transforms}
\begin{center}
{\bf Commands for Polynomials}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt residue(p,q)} \index{\computer!residue} \>
Determines partial fractions expansion of
{\tt p/q} where {\tt p} and {\tt q} are polynomials
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{chap:SingleOdes}{
\subsection*{Chapter~\ref{chap:SingleOdes}: Additional Techniques for Solving ODEs}
\begin{center}
{\bf Graphics Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt contour(F)} \index{\computer!contour} \>
Plots contour lines of the function {\tt F} \\
{\tt contour(x,y,F)} \index{\computer!contour} \>
Plots contour lines of the function {\tt F}
where the axis scales are given by {\tt x} and {\tt y} \\
{\tt clabel(c)} \index{\computer!clabel} \>
Labels contour lines obtained by {\tt contour}
by their actual levels
\end{tabbing}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\iflabelexists{ch:NumSolODE}{
\subsection*{Chapter~\ref{ch:NumSolODE}: Numerical Solutions of ODEs}
\begin{center}
{\bf Graphics Commands}
\end{center}
\begin{tabbing}
\hspace{1.2in} \= \\
{\tt plot(x,y,'--')} \index{\computer!plot} \>
Plots a graph connecting the points $(x(i),y(i))$
in sequence and connects \\ \> subsequent points with a dashed line\\
{\tt plot(x,y,'+')} \index{\computer!plot} \>
Plots a graph connecting the points $(x(i),y(i))$
in sequence and \\ \> marks each point with a `+'\\
{\tt plot(x,y,'x')} \index{\computer!plot} \>
Plots a graph connecting the points $(x(i),y(i))$
in sequence and \\ \> marks each point with an `x'
\end{tabbing}
\begin{center}
{\bf \Matlab Function}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt round(x)} \index{\computer!round} \>
Rounds the number $x$ towards the nearest integer.
\end{tabbing}
\begin{center}
{\bf Vector Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt diff(v)} \index{\computer!diff} \>
Compute the differences of consecutive entries in the vector {\tt v}\\
{\tt length(v)} \index{\computer!length} \>
The length of the vector {\tt v}
\end{tabbing}
\begin{center}
{\bf Programming Commands}
\end{center}
\begin{tabbing}
\hspace{1.1in} \= \\
{\tt for k = 1:K} \index{\computer!for} \index{\computer!for\ldots end} \>\\
\hspace{0.1in} MATLAB {\tt commands} \> \\
{\tt end} \> \\
\> The MATLAB commands between {\tt for k = 1:K} and {\tt end}\\ \>
are done $K$ times where $k$ varies from $1,2,\ldots,K$.
\end{tabbing}
}
\end{document}