Matlab基礎學習-----資料顯示格式(設定)

來源:互聯網
上載者:User

標籤:matlab   資料顯示格式   

使用format來控制顯示格式,但這隻是影響結果的顯示,不影響其計算與儲存。下面以1/3為例,對資料顯示進行說明:

          format|format short          5位定點表示                                            0.3333

          format long                15位定點表示                                                0.333333333333333

          format short e               5位浮點表示                                                3.3333e-001

          format long e              15位浮點表示                                               3.333333333333333e-01

          format short g       系統選擇5位定點和5位浮點中更好的表示          0.33333

          format long g        系統選擇15位定點和15位浮點中更好的表示      0.333333333333333

          format rat           近似的有理數的表示                                             1/3 

          format hex          十六進位的表示                                                    3fd5555555555555

          format bank          用元 角分(美製)定點表示                               0.33

          format compact       變數之間沒有空行 

          format loose          變數之間有空行

          format +             大矩陣資料表示,正數,負數和0用+,-和空格表示    +


當然也可以不用format 命令,可以修改系統的預設設定格式,File->Preferences->Command Window->Text Display.


Matlab基礎學習-----資料顯示格式(設定)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.