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 FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: NoneAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: OpenRelease: other
Operating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission 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'

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 20 Mar 2014 09:27:24 AM UTCmfasiAttached File-=>Added sprintfc-2.patch, #30954
    Wed 05 Mar 2014 06:07:35 PM UTCmfasiAttached File-=>Added sprintfc.patch, #30782

    Back to the top


    Powered by Savane 3.1-cleanup