matlab如何在矩阵的每个元素前补0。

matlab如何在矩阵的每个元素前补0,补成16位,比如10000000,就补成0000000010000000

 Accepted Answer

nhjaenx
nhjaenx on 22 May 2023

0 votes

①请直接发布代码/报错信息的文本、以附件给出必要数据,请不要用粘贴截图的方式(这会同时浪费提问者和回答者的时间)提问。
②自己用 num2str( M, '%016g' ) 或者 fprintf( '%016g', M ) 去指定格式做转化。总之浮点数默认不会显示前面的零的,得转成字符、字符串。
③请先去找点讲MATLAB基础的书籍资料,比如《 邢树军译 matlab教程 》,好好学习一下基础知识,很多问题根本就不难,作为一个大学生应该自己解决。

More Answers (0)

Categories

Find more on MATLAB 快速入门 in Help Center and File Exchange

Asked:

on 22 May 2023

Answered:

on 22 May 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!