octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34778] norm fails when OPT argument is given


From: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #34778] norm fails when OPT argument is given
Date: Tue, 08 Nov 2011 17:37:56 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2

URL:
  <http://savannah.gnu.org/bugs/?34778>

                 Summary: norm fails when OPT argument is given
                 Project: GNU Octave
            Submitted by: juanpi
            Submitted on: Tue 08 Nov 2011 05:37:49 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:


In function ./src/xnorm.cc line 97 and 138 the function to calculate norms
along rows or columns are defined.

This functions are not working if the type of norm is selected.


> norm(rand(4,3),"fro","cols")
error: invalid conversion from string to real scalar

> norm(rand(4,3),"fro","rows")
error: invalid conversion from string to real scalar

I think the problem is an incorrect handling of the 2 string arguments case:

Built-in Function:  norm (A, P, OPT)

Because 
> norm(rand(4,3),"rows")
and
> norm(rand(4,3),"cols")

work fine applying the l2 norm ("fro").

I tried to generate a patch but Ia m not yet successful.







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34778>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]