|
From: | Juan Pablo Carbajal |
Subject: | Re: patch for union.m |
Date: | Fri, 31 Jul 2015 20:16:35 +0200 |
On 07/31/2015 09:00 AM, address@hidden wrote:
Subject:Re: an unreported fix to union.m From:Juan Pablo Carbajal <address@hidden> Date:07/31/2015 05:08 AM
To:Maintainers GNU Octave <address@hidden>
List-Post:<mailto:address@hidden> Precedence:list MIME-Version:1.0 References:<address@hidden> In-Reply-To:<address@hidden> Message-ID:<address@hidden> Content-Type:text/plain; charset=UTF-8 Message:5
On Fri, Jul 31, 2015 at 1:02 PM, Juan Pablo Carbajal <address@hidden> wrote:I have condensed the changes into a single line correction and added some tests. Please verify that indeed the output is compatible with Matlab's https://savannah.gnu.org/patch/index.php?8710
Juan,
I know you were following the code that was already there, but I think it can be simplified further. There is no need to check both isvector() and isrow() since isrow already checks that the input is a vector.
+ isrowvec = ( isempty(a) || (isvector (a) && isrow (a)) ) && ...
+ ( isempty(b) || (isvector (b) && isrow (b)) );
=>
isrowvec = (isrow (a) || isempty (a)) && (isrow (b) || isempty (b));
--Rik
[Prev in Thread] | Current Thread | [Next in Thread] |