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

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

[Octave-bug-tracker] [bug #60515] trace documentation


From: anonymous
Subject: [Octave-bug-tracker] [bug #60515] trace documentation
Date: Tue, 4 May 2021 04:39:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?60515>

                 Summary: trace documentation 
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 04 May 2021 08:39:44 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Documentation
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:


A=rand(3,3,3);
x=trace(A)
error: trace: only valid on 2-D objects
error: called from
    trace at line 37 column 5


Expected x to consist of 3 values. 

The documentation is not clear about this:


## -*- texinfo -*-
## @deftypefn {} {} trace (@var{A})
## Compute the trace of @var{A}, the sum of the elements along the main
## diagonal.
##
## The implementation is straightforward: @code{sum (diag (@var{A}))}.
## @seealso{eig}
## @end deftypefn


The error is more clear.



---------------------------

Having many DCM and doing the trace.
Does this need to done in a loop?




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60515>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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