bugGNU Octave - Bugs: bug #57774, fullfile error with cell array...


bug #57774: fullfile error with cell array input other than last

Submitted by:  Paul Netsaver <netsaver>
Submitted on:  Sat 08 Feb 2020 10:26:17 PM UTC  
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Netsaver Paul Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Sat 28 Mar 2020 09:58:31 PM UTC, comment #6: 

I have modified the code and ran the test successfully on my Ubuntu 16.04 machine. It seems to be good now. I am attaching the diff file.

(file #48696)

vishnu parammal <vishnuparammal>
Sat 28 Mar 2020 02:58:00 PM UTC, comment #5: 

Your modification breaks the BISTs for "fullfile" for me.
In particular, fullfile("") should return a 0x0 empty string. But it returns a 1x0 empty string with your modification.

You can check the BISTs in .m files by executing "test FILE" in Octave.
So in this case:

test fullfile

Markus M├╝tzel <mmuetzel>
Project Member
Thu 19 Mar 2020 02:20:23 PM UTC, comment #4: 

I am attaching the diff file for review

(file #48626)

vishnu parammal <vishnuparammal>
Wed 18 Mar 2020 10:48:15 PM UTC, comment #3: 

If you are set up to do so I would recommend you create a changeset and post the diff patch here.

Nicholas Jankowski <nrjank>
Wed 18 Mar 2020 09:55:50 PM UTC, comment #2: 

I have a solution. The results are matching as expected in the comment #1. I have verified it with the results from Matlab. I have also written a test case at the end for this bug. The solution is working on my Ubuntu 16.04. I have attached the file. Please verify.

(file #48624)

vishnu parammal <vishnuparammal>
Sat 08 Feb 2020 11:48:03 PM UTC, comment #1: 

Thank you for finding and describing this missing feature. Confirmed with Octave's development branch, and verified on Matlab's web site. Can you help improve fullfile to make this feature work in Octave?

Mike Miller <mtmiller>
Project Administrator
Sat 08 Feb 2020 10:26:17 PM UTC, original submission:  

It seems to be a difference with Matlab about function fullfile:

output = fullfile({'folder1','folder2'},'sub',{'f1.m','f2.m'})

it should accept inputs: folders={'folder1','folder2'} and files={'f1.m','f2.m'} as they have the same length.

In general it should accept cell-array-of-strings inputs whose length is 1 or N, producing in output a cell array of size 1xN:

output = {
[1,1] = folder1/sub/f1.m
[1,2] = folder2/sub/f2.m

Paul Netsaver <netsaver>


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

Attach Files:

Attached Files
file #48696:  fullfile.diff added by vishnuparammal (3KiB - application/octet-stream)
file #48626:  fullfile.diff added by vishnuparammal (2KiB - application/octet-stream)
file #48624:  fullfile1.m added by vishnuparammal (5KiB - application/octet-stream - fullfile)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by vishnuparammal (Updated the item)
  • -email is unavailable- added by netsaver (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    21:58 vishnuparammal Attached File- => Added fullfile.diff, #48696
    2020-03-19 vishnuparammal Attached File- => Added fullfile.diff, #48626
    2020-03-18 vishnuparammal Attached File- => Added fullfile1.m, #48624
    2020-02-08 mtmiller Severity3 - Normal => 2 - Minor
        Priority5 - Normal => 3 - Low
        StatusNone => Confirmed
        Release5.2.0 => dev
        Operating SystemMicrosoft Windows => Any

    Back to the top

    Powered by Savane 3.5