bugGNU Octave - Bugs: bug #62978, [octave forge] (image) applylut...

 
 

bug #62978: [octave forge] (image) applylut & makelut are not MATLAB compatible

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Mon 29 Aug 2022 03:39:19 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 25 Sep 2022 08:42:29 AM UTC, comment #1: 

makelut is also not MATLAB compatible:

In Octave:


>> f = @(x) (x(1,1) == 1);
>> lut = makelut (f, 2)'
lut =

   0   0   0   0   0   0   0   0   1   1   1   1   1   1   1   1


while MATLAB result is:


lut =

   0   1   0   1   0   1   0   1   0   1   0   1   0   1   0   1


Though applylut & makelut are compatible with each other.


Avinoam Kalma <avinoam>
Group Member
Mon 29 Aug 2022 03:39:19 PM UTC, original submission:  

While debugging bug #62452, I have seen the next example:


a = [
    0   0   0   0   0   0
   0   0   0   0   0   0
   0   0   0   0   0   0
   0   0   0   0   0   0
   0   0   1   1   0   0
   0   0   0   0   0   0
   0   0   1   0   0   0
   0   0   1   0   0   0
   0   0   0   0   0   0
   0   0   1   0   0   0
   0   0   0   1   0   0
   0   0   0   0   0   0
   0   0   0   1   0   0
   0   0   1   0   0   0
   0   0   0   0   0   0
   0   0   0   0   0   0
];
a = logical(a);
lut2 = false (512, 1);
lut2(19) = true;

applylut (a, lut2)


MATLAB and Octave give different results.


Avinoam Kalma <avinoam>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Submitted the item)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-25 avinoam Summary[octave forge] (image) applylut is not MATLAB compatible [octave forge] (image) applylut & makelut are not MATLAB compatible
    2022-08-29 avinoam Carbon-Copy- Added carandraug
        Carbon-Copy- Added hardy

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code