bugGNU Octave - Bugs: bug #52723, unexpected space in matrix...

 
 

bug #52723: unexpected space in matrix expression (brackets) in document

Submitted by:  None
Submitted on:  Fri 22 Dec 2017 03:22:30 AM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: FixedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.1
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 23 Dec 2017 02:42:16 PM UTC, comment #6:

I'm sorry for posting too many recently,
and again thank maintainers very much for fixing them.

Anonymous
Sat 23 Dec 2017 12:05:29 PM UTC, comment #5:

A too too small typo found in Section 11.9.4 Nested Functions, page 200:

Anonymous
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):

Anonymous
Sat 23 Dec 2017 12:09:36 AM UTC, comment #3:

I checked in a fix here (http://hg.savannah.gnu.org/hgweb/octave/rev/b9d482dd90f3).

I rewrote the Advanced Indexing section to use 'nd' instead of 'n' for number of dimensions which helped a bit with the clarity.

Rik <rik5>
Project Administrator
Fri 22 Dec 2017 07:04:04 AM UTC, comment #2:

And another issue in the same chapter:
(It's too small so I didn't open a new bug report.)

In Section 8.3 Arithmetic Operators, page 145,
unlike "." (times), the "" (mtimes) has no relation to broadcasting.

Anonymous
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:

Anonymous
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:

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 23 Dec 2017 12:09:36 AM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1