octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45174] num2str produces different results fro


From: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #45174] num2str produces different results from Matlab for some corner cases
Date: Wed, 17 Jun 2015 13:07:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.125 Safari/537.36

Follow-up Comment #3, bug #45174 (project octave):

The bug in comment #1 is caused at line ~119 of num2str where it says

fmt = [deblank(repmat (fmt, 1, columns (x))), "n"];


This line assumes that the fmt input is only a format string and nothing else,
and applies the same for all columns of x.

The use of num2str in comment #1 seems incorrect to me,  sprintf should be
used instead. What does matlab do when the format string of num2str is
"sometext_%d_%d"?



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45174>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]