bugGNU Octave - Bugs: bug #60275, Some details in documentation of...

 
 

bug #60275: Some details in documentation of if and while

Submitter:  José Luis García Pallero <jgpallero>
Submitted:  Tue 23 Mar 2021 11:22:43 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 08 Apr 2021 10:37:13 PM UTC, comment #2: 

I re-did the documentation for the keywords including making the change to be more specific about what COND means for if, while, and until statements.  See cset http://hg.savannah.gnu.org/hgweb/octave/rev/4f555ba551e5.

Rik <rik5>
Group administrator
Thu 25 Mar 2021 03:13:29 AM UTC, comment #1: 

It doesn't look to me like Matlab even supports complex arguments in if statements.  This code produces an error in Matlab:


x = complex (0, 1);
if (x)
  disp ('true');
end


The error is "Complex values cannot be converted to logical".

Does this match what you see?  If so, the documentation for Matlab is out of date.

Rik <rik5>
Group administrator
Tue 23 Mar 2021 11:22:43 AM UTC, original submission:  

Matlab has this text in its documentation of if and while statements:

"The statements are executed if the real part of the expression has all non-zero elements"

I find this information useful as a warning for students when they try to vectorize some computations. It would be nice if Octave includes also this tip

José Luis García Pallero <jgpallero>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-08 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2021-03-25 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code