Here's the errata for the first edition of Mastering MATLAB 6. Corrections are listed in page order.
If you find any content or typographical errors not listed here, please contact the authors so we can update this list. Thanks.
| Page Numbers: | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 9 | 19 | 71 | 97 | 168 | 206 | 218 | 235 | 253 | 256 | ||
| 270 | 271 | 286 | 291 | 334 | 351 | 364 | 374 | 430 | 433 | ||
| 469 | 533 | 534 | 591 | 599 | |||||||
vararoutshould read
varargout
cartpolshould read
cart2pol
A(i,j) above is equivalent to
» [A(3,1) A(3,2) A(2,3) A(3,3)
A(3,1) A(3,2) A(2,3) A(3,3)
A(2,1) A(2,2) A(2,3) A(2,3)
A(3,1) A(3,2) A(2,3) A(3,3)]
ans =
7 8 6 9
7 8 6 9
4 5 6 6
7 8 6 9
should read
A(i,j) above is equivalent to
» [A(3,1) A(3,2) A(3,3) A(3,3)
A(3,1) A(3,2) A(3,3) A(3,3)
A(2,1) A(2,2) A(2,3) A(2,3)
A(3,1) A(3,2) A(3,3) A(3,3)]
ans =
7 8 9 9
7 8 9 9
4 5 6 6
7 8 9 9
» ipermute(M,[3 2 1]) % back to original data
ans(:,:,1) =
1 3 5
7 9 11
13 15 17
ans(:,:,2) =
2 4 6
8 10 12
14 16 18
should read
» ipermute(ans,[3 2 1]) % back to original data
ans(:,:,1) =
1 3 5
2 4 6
ans(:,:,2) =
7 9 11
8 10 12
ans(:,:,3) =
13 15 17
14 16 18
For array expressions, the While Loop terminates only when all elements inshould read
expression are True. If you want the While Loop to terminate when any element is True, ...
For array expressions, the While Loop continues only when all elements in
expression are True. If you want the While Loop to continue when any element is True, ...
These data inport and export functions ...should read
These data import and export functions ...
» union(A,B) % matrix inputs produce sorted column arraysshould read
ans =
1
2
3
4
5
6
7
8
» union(A,B,'rows') % matrix inputs produce combined rows with no repetitions
ans =
0 0 1
0 1 0
1 0 0
1 1 1
Ans =should read
ans =
idx = ~isnan(temps4(i,:));should read
idx = ~isnan(temps4(:,i));
For example
» data = randn(10,4) % new data for sortingshould read
data =
» newdata = randn(10,4) % new data for sortingand
newdata =
» [tmp,idx] = sort(data(:,2)); % sort second columnshould read
datas = data(idx,:) % shuffle rows using idx from 2nd column
datas =
» [tmp,idx] = sort(newdata(:,2)); % sort second columnand
newdatas = newdata(idx,:) % shuffle rows using idx from 2nd column
newdatas =
For example, the last row of data is now the firstshould read
row in datas because the last element in the second column is the smallest element in the second column.
For example, the last row of newdata is now the first
row in newdatas because the last element in the second column is the smallest element in the second column.
» dsearch(x, y, tri, [-.5 1], [.1 .5])should read
» dsearch(x, y, tri, [-.5 .1], [.1 .5])
» k = convhull(x,y,tri)should read
» k = convhull(x,y)'
yi = interp1(x,y,yi,'spline'). Consider the exampleshould read
yi = interp1(x,y,xi,'spline'). Consider the example
and whose area over the region xk<=x<=xk+1 isshould read
and whose area over the region [xk,x] where xk<=x<=xk+1 is
Sk(x) dxshould read
sk(x) dx
+ Sk-1(xk)should be deleted.
ý2 = µ(1 - y12) - y1should read
ý2 = µ(1 - y12)*y2 - y1
If you change the order of the arguments, the plot rotates 90 degrees, for example,should read
If you change the order of the arguments, the orientation of the plot changes accordingly, for example,
» z = pi:pi/5:pi;should read
» z = -pi:pi/5:pi;
elipseshould read
ellipse
Figure 27.5c:|dX/dy|should read
Figure 27.5c:|dZ/dy|
» subplot(2,2,1)zshould read
» subplot(2,2,1)
Hl_lines = plot(x,y,x,z);should read
Hl_line = plot(x,y,x,z);
~a not(a,b) Logical NOT.should read
~a not(a) Logical NOT.
a(s1,s2,...) = b subsagn(a,s) Subscripted assignment.should read
a(s1,s2,...) = b subsagn(a,s,b) Subscripted assignment.
FORTRanshould read
FORTRAN
status = matClose(mp)should read
status = matClose(mfile)