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

 
 

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

Submitted by:  José Luis García Pallero <jgpallero>
Submitted on:  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

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project 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)
  •  

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

    Only project 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.7