⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 num2str2.htm

📁 matlab的FDC工具箱
💻 HTM
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="fdchelp.css">
    <title>
      FDC help: NUM2STR2
    </title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#DDDDDD"><div>
    <h2>
      The utility <i>NUM2STR2</i>
    </h2>
    <p><i>NUM2STR2</i> convers numbers to strings. Contrary to the Matlab routine <i>NUM2STR</i>, this utility makes it possible to specify the number of characters for the string representation.</p>
    <h3>Usage</h3>
    <p><code>T = num2str2(X,C)</code> returns a string <i>T</i> with <i>C</i> characters. In general, the number of decimal places will be equal to <i>C</i>&nbsp;-&nbsp;2 (=&nbsp;number of characters minus space reserved for possible signs or decimal points). If a number does not fit, it is rounded to a value which does fit in <i>C</i> characters. If the number of characters is not specified, as in: <code>T&nbsp;=&nbsp;NUM2STR2(X)</code>, the return-string <i>T</i> will automatically be set-up with 6 characters. Leading spaces will be used for numbers requiring less than <i>C</i> characters.</p>
    <p>If necessary, an exponent will be created, still within the reserved space of <i>C</i> characters. In that case the number of decimal places will be reduced (an exponent typically takes four characters, e.g. 'E+25').</p>
    <p><b>Note:</b> values of C smaller than 6 are not accepted and automatically converted to <i>C</i>&nbsp;=&nbsp;6! This prevents problems that may occur when trying to show very large numbers in too few characters. However, you may still encounter strange results if you reserve a very small space for large numbers.</p>
  </div></body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -