[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #7469] Fix Intersect error when used for '
From: |
Juanjo Martin |
Subject: |
[Octave-patch-tracker] [patch #7469] Fix Intersect error when used for 'rows' |
Date: |
Thu, 17 Feb 2011 10:18:53 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) |
URL:
<http://savannah.gnu.org/patch/?7469>
Summary: Fix Intersect error when used for 'rows'
Project: GNU Octave
Submitted by: jjmmg
Submitted on: Thu 17 Feb 2011 10:18:52 AM GMT
Category: None
Priority: 7 - High
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Environment:
* Octave 3.2.4_gcc-4.4.0
* Windows
Error:
When "[c,ia,ib]=intersect(a,b,'rows')" function calculates the ib indexes
(line 76 in intersect.m), it doen't distinguish between column or rows, as it
uses length(a).
Fix:
Changing line 76:
ib = jb(ic(ii+1) - length (a)); ## b(ib) == c
To
if (nargin > 2)
ib = jb(ic(ii+1) - size (a, 1)); ## b(ib) == c
else
ib = jb(ic(ii+1) - size (a, 2)); ## b(ib) == c
endif
takes into account the 'rows' input parameter, so the right dimenson is used.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 17 Feb 2011 10:18:52 AM GMT Name: intersect.m Size: 3kB By:
jjmmg
<http://savannah.gnu.org/patch/download.php?file_id=22709>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?7469>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #7469] Fix Intersect error when used for 'rows',
Juanjo Martin <=