octave-maintainers
[Top][All Lists]
Advanced

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

Re: patch for union.m


From: Rik
Subject: Re: patch for union.m
Date: Fri, 31 Jul 2015 12:09:28 -0700

On 07/31/2015 11:16 AM, Juan Pablo Carbajal wrote:


On Fri, Jul 31, 2015 at 8:14 PM, Rik <address@hidden> wrote:
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

Thanks for checking the patch Rik. Shall I update?

No need.  If you're okay with my change I'll just incorporate it and commit the patch this weekend.

could you test that indeed this increases compatibility with matlab?


I've never had  access to Matlab.  Try posting the code you want run in Matlab to the maintainer's list with instructions.  There is usually someone who can try it out for you.

--Cik

reply via email to

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