bugGNU Octave - Bugs: bug #49152, printf output incompatible with...

 
 

bug #49152: printf output incompatible with MATLAB

Submitted by:  None
Submitted on:  Wed 21 Sep 2016 07:34:26 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Andy PotvinOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.3
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 21 Sep 2016 07:42:49 PM UTC, comment #1:

Matlab does not have a printf function, or at least one that is documented and advertised on their public-facing docs.

Octave's printf function is compatible with the C library function and is exactly the same as Matlab's fprintf when called with no file argument.

For Matlab compatibility you should stick to the documented functions fprintf and sprintf.

If there really is a Matlab printf function, please provide a link to documentation or a description of which versions of Matlab it is provided by and how it works. Closing as won't fix for now, but can be reopened if this really does need to be done for compatibility.

Mike Miller <mtmiller>
Project Administrator
Wed 21 Sep 2016 07:34:26 PM UTC, original submission:

Notice the difference between MATLAB and Octave output printf.
Octave should do what MATLAB does.

It IS ok to contact me about this bug report or for any other
related question.
Andy Potvin
-unavailable-
(626) 226-8436

Octave 4.0.3
=-=-=-=-=-=-=

>> printf('fubar')

fubar>>

MATLAB 2012a
=-=-=-=-=-=-=

>> printf('fubar')

fubar
ans =
5

>> ver

----------------------------------------------------------------------
GNU Octave Version: 4.0.3
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 i686
----------------------------------------------------------------------
Package Name | Version | Installation directory
---------------------+---------+-----------------------
<unimportant>

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    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
    Wed 21 Sep 2016 07:42:49 PM UTCmtmillerStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1