bugGNU Octave - Bugs: bug #34852, incorrect column number on error...


bug #34852: incorrect column number on error messages

Submitted by:  None
Submitted on:  Thu 17 Nov 2011 08:21:19 PM UTC  
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: delinquentmeOriginator Email: -unavailable-
Open/Closed: OpenRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)

You are not logged in

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


Sat 19 Nov 2016 07:32:42 PM UTC, comment #4:

This issue is still present in Octave 4.2.0.

Here is the code of the original submission in runable form:

The resulting error message is

If I understand jwe's comment #2 correct, then it would be better if Octave did not mention any column number at all in this error message, since this column number is not adding any useful information anyways.

My personal opinion: There might as well be cases where the given column number makes debugging easier than without this column number. Just imagine code that has several commands on a single text line, like this

Hartmut <hardy>
Sat 27 Dec 2014 05:22:04 PM UTC, comment #3:

Added bug #43249 as a related bug. In that case, the reported line number from an error is incorrect rather than the reported column number.

Rik <rik5>
Project Administrator
Thu 17 Nov 2011 08:40:00 PM UTC, comment #2:

It's difficult to see here because the web interface eats whitespace (use verbatim ... verbatim tags here next time to enclose code), but the problem is that the error line is pointing to the assignment operator instead of the multiplication operator.

A relevant discussion from #octave follows:

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu 17 Nov 2011 08:36:46 PM UTC, comment #1:
Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Thu 17 Nov 2011 08:21:19 PM UTC, original submission:

function [theta, J_history] = gradientDescent(X, y, theta, alpha, num_iters)

m = length(y); % number of training examples
J_history = zeros(num_iters, 1);

for iter = 1:num_iters

theta = theta - alpha/m * sum ( (((Xtheta) - y) )X )

J_history(iter) = computeCost(X, y, theta);




above code nets this error ( with an incorrect column number )


error: operator *: nonconformant arguments (op1 is 97x1, op2 is 97x2)
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error: called from:
error: /home/thrive/Desktop/studies/machine_learning/ex1/mlclass-ex1/gradientDescent.m at line 9, column 11



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

Attach File(s):

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by jordigh (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 27 Dec 2014 05:20:32 PM UTCrik5Dependencies-=>bugs #43249 is dependent
    Sun 19 Jan 2014 10:40:00 PM UTCmtmillerCategoryNone=>Interpreter
      Item GroupNone=>Incorrect Result
      Operating SystemGNU/Linux=>Any
    Thu 17 Nov 2011 08:36:46 PM UTCjordighSeverity3 - Normal=>2 - Minor

    Back to the top

    Powered by Savane 3.1-cleanup1