Sat 23 Dec 2017 04:42:01 AM UTC, comment #4:
Thank maintainers very much for fixing so many small issues found recently.
The Advanced Indexing section seems still have problems:
(1)
after using 'nd' instead of 'n', some following 'n' should also be changed to 'nd'.
and (2)
there are still 'm' and 'm(i)', so 'm' is still ambiguous.
Possible solutions:
(1)
like 'nd', let 'md' denote the number of indices (i.e. 'md=numel(m)'), and 'm(i)' still denotes the i-th index.
or (2)
do not use 'm(i)' at all, then there is no ambiguity, and we can still let 'm'/'n' denote the number of indices/dimensions as the original version. This makes less difference from the original version.
patch for solution (1):
patch for solution (2):
|
Fri 22 Dec 2017 04:26:04 AM UTC, comment #1:
Section 8.1.1 Advanced Indexing, paragraph 2:
1.
"ones(m-n, 1)" should be "ones(n-m, 1)" since m < n.
2.
It seems that "ones(n-m, 1)" is not necessary to be put into "[ ]"
since an index expression is a cs-list rather than a vector.
3.
It seems that the symbol 'm' and 'n' have been reused.
Standalone 'm' means the number of indices and 'n' means 'ndims(a)',
but in 'm(i)' 'n(i)', 'm' means the whole indices and 'n' means 'size(a)'.
4.
If m < n, not any one of the indices 'm(i)' but only the last index 'm(end)' can be outside the size.
For example, if 'a = reshape(1:8,2,2,2)', then 'a(4,_)' is not allowd but 'a(_,4)' is allowed.
I try to rephase the paragraph as follow:
and a more neat version:
|
Fri 22 Dec 2017 03:22:30 AM UTC, original submission:
The GNU convention to add a space between the function name
and the "(" may cause problem within the matrix expression "[ ]".
As described in Section 4.1 Matrices,
"[ sin (pi) ]" will result in an error
and instead we should use "[ (sin (pi)) ]" or "[ sin(pi) ]".
However, this case still appears in the document:
Section 8.1.1, paragraph 2:
"[ones (m-n, 1)]"
Section 15.2.2.2, function ezmesh,ezmeshc,ezsurf,ezsurfc:
"[FX (S, T), FY (S, T), FZ (S, T)]"
while the following seems to be correct:
Section 21.2.1:
"[D(1:n,n) * M; zeros(m-n, columns (M))]"
Section 28.5:
"x = 2 * pi * [0, (rand (1, 98)), 1]"
"cc = [(eye (2)), (eye (2))]"
The above results are got from INFO version document with regexp
It seems that Section 8.1.1 also has other problems. I would try to give some suggestion later.
Possible solution to Section 15.2.2.2:
|