bugGNU Octave - Bugs: bug #41504, New function: sprintfc


bug #41504: New function: sprintfc

Submitted by:  None
Submitted on:  Fri 07 Feb 2014 04:46:01 PM UTC  
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Postponed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
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)

Thu 20 Mar 2014 09:27:24 AM UTC, comment #6: 

I have submitted a new changeset, that addresses the problem you have pointed out, substituting the loopy structure with a reshape. As suggested by nfk, I have also changed the tests, that now use assert ().

(file #30954)

Massimiliano Fasi <mfasi>
Wed 19 Mar 2014 09:07:10 PM UTC, comment #5: 

This implementation with for loops is bound to be very slow. If implemented in m-code, this should at least be done with cellfun, I believe. Did you time a cellfun version? Did you also attempt to write a version in C++?

I suppose having a slow implementation may be better than having no implementation at all. Or it might not be.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 05 Mar 2014 06:07:35 PM UTC, comment #4: 

Submitted a patch that should fix the bug.

(file #30782)

Massimiliano Fasi <mfasi>
Sun 09 Feb 2014 02:23:54 AM UTC, comment #3: 

A good compromise, if anyone cared to offer it up, would be to implement it in m-code, not C.

Michael C. Grant <mcgrant>
Sat 08 Feb 2014 04:19:20 AM UTC, comment #2: 

It doesn't seem wise to try and match an undocumented internal function that Matlab could choose to change or remove at any time.  Yes, I know that they haven't changed it for 9 years according to this blog (http://undocumentedmatlab.com/blog/sprintfc-undocumented-helper-function/), but that is still no guarantee.

Rik <rik5>
Project Administrator
Fri 07 Feb 2014 05:13:55 PM UTC, comment #1: 

How can we implement it if there's no description of what it does?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Fri 07 Feb 2014 04:46:01 PM UTC, original submission:  

sprintfc is an undocumented Matlab function

>> sprintfc('%d', 1:3)

ans =

    '1'    '2'    '3'



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

Attach Files:

Attached Files
file #30954:  sprintfc-2.patch added by mfasi (3KiB - text/x-diff)
file #30782:  sprintfc.patch added by mfasi (2KiB - text/x-diff)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by mfasi (Updated the item)
  • -email is unavailable- added by mcgrant (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jordigh (Posted a comment)

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-03 mtmiller Severity3 - Normal => 1 - Wish
        StatusNone => Postponed
        Releaseother => dev
    2014-03-20 mfasi Attached File- => Added sprintfc-2.patch, #30954
    2014-03-05 mfasi Attached File- => Added sprintfc.patch, #30782

    Back to the top

    Powered by Savane 3.5