num2str的使用

num2str(real number,int characters,int decimals,int separator1,int separator2)

Converts the decimal number specified by number to a text string. The minimum number of characters required in the text is specified by characters, and the required number of decimals is specified by decimals. The decimal separator required in the text is specified by separator1, and the thousands separator required in the text is specified by separator2.

The possible values for separator1 are:

  • '1': a '.' (point)
  • '2': a ',' (comma)

The possible values for separator2 are:

  • '0': no thousands separator
  • '1': a '.' (point)
  • '2': a ',' (comma)
  • '3': a ' ' (space)

MorphX replaces any invalid parameter with a standard value.

Examples

Num2Str(12345.6,10,2,2,1) returns "12.345,60".

Num2Str(12345.6,1,0,1,0) returns "12346".  

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值