view .hgsubstate @ 21057:b0afe1993268

Overhaul num2str.m and int2str.m for Matlab compatibility (bug #46770). * num2str.m: Add multiple programming notes to docstring. Re-write algorithm to determine sprintf format to handle all zero arrays, all NaN/Inf arrays. Rename variable 'dgt' to 'ndgt' for clarity. Don't add an extra formatting space to handle the minus sign for negative numbers (Matlab compatibility). Use '%.0f' format for integers rather than '%g' as it displays slightly better. Rename variable 'tmp' to 'strtmp' for clarity. Rewrite some BIST tests to match new function behavior. * int2str.m: Replace code with the same code used for integers in num2str.m Add Programming Note to docstring.
author Rik <rik@octave.org>
date Wed, 13 Jan 2016 12:05:28 -0800
parents 85d9cb769e8b
children 407c01ee1d9a 12b31cb1d6b7
line wrap: on
line source

7f19e7f2afa2b1476983003f9cd6df2f5b2a4b08 gnulib-hg