bugGNU Octave - Bugs: bug #49204, addition of two dissimilar vectors

 
 

bug #49204: addition of two dissimilar vectors

Submitter:  None
Submitted:  Wed 28 Sep 2016 06:23:24 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.3
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 28 Sep 2016 06:28:11 AM UTC, comment #1: 

This is a new feature called broadcasting:

https://www.gnu.org/software/octave/doc/v4.0.3/Broadcasting.html

Dmitri A. Sergatskov <dasergatskov>
Wed 28 Sep 2016 06:23:24 AM UTC, original submission:  

Following problems in a book (GNU Octave Packt Publishing) I added two dissimilar vectors b = [1 2 3] and c=[1;2;3]: A 1x3 vector and the other a 3x1 vector. Since I tend to react too quickly I questioned that I understood what I was looking at, but regardless Octave gave me a 3x3 vector:

                             2 3 4
                             3 4 5
                             4 5 6
The Book said that I should have seen an error, not a matrix! But assuming I might be doing something wrong I tried it out in scilab and I got the error. I went back to my linear algebra book and it said that I cannot add a 1x3 to a 3x1, and I looked it up on the internet and it too said that.

But I wondered how in the world can a major piece of code be wrong on such a basic operation. This kind of a problem is covered on the first day of linear algebra 101.

Am I doing something wrong or is there a bug in Octave?

Anonymous

 

(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 mtmiller (Updated the item)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by None (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-28 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code