[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33292] trapz on matrices does not allow a vec
From: |
Helios De Rosario |
Subject: |
[Octave-bug-tracker] [bug #33292] trapz on matrices does not allow a vector as first argument |
Date: |
Wed, 11 May 2011 17:02:03 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12 (.NET CLR 3.5.30729) |
URL:
<http://savannah.gnu.org/bugs/?33292>
Summary: trapz on matrices does not allow a vector as first
argument
Project: GNU Octave
Submitted by: heliosdr
Submitted on: Wed May 11 17:02:02 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Helios De Rosario
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.4
Operating System: Microsoft Windows
_______________________________________________________
Details:
According to documentation, the trapz function (and cumtrapz as well) assumes
an equally spaced vector as first argument _x_, if it is ommited in the call.
Thus, I expected the function to work when a vector is explicitly entered,
even though the second argument is a matrix (whenever its first non-singleton
dimension is equal to the lenght of _x_).
However, that does not work (unlike in MATLAB):
x = linspace(0,1,100)';
y = [x, 2*x, x.^2];
intg = cumtrapz(x,y);
That can be easily solved by automatically expanding _x_ to match the
dimensions of _y_.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33292>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #33292] trapz on matrices does not allow a vector as first argument,
Helios De Rosario <=