• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MATLAB不用科学计数法写入数据至txt - 那抹阳光1994

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

MATLAB不用科学计数法写入数据至txt

dlmwrite(filename,file,\'delimiter\',\',\',\'newline\',\'pc\',\'precision\',\'%.7f\');

设置精度就不会将科学计数法的数据写入到txt文件中去。

 

matlab中保留有效位数

通过 vpa可以仅保留有效位数

vpa    Variable precision arithmetic.
    R = vpa(S) numerically evaluates each element of the double matrix
    S using variable precision floating point arithmetic with D decimal
    digit accuracy, where D is the current setting of DIGITS.
    The resulting R is a SYM.
 
    vpa(S,D) uses D digits, instead of the current setting of DIGITS.
    D is an integer or the SYM representation of a number.
 
    It is important to avoid the evaluation of an expression using double
    precision floating point arithmetic before it is passed to vpa.
    For example,
       phi = vpa((1+sqrt(5))/2)
    first computes a 16-digit approximation to the golden ratio, then
    converts that approximation to one with d digits, where d is the current
    setting of DIGITS.  To get full precision, use unevaluated string or
    symbolic arguments,
       phi = vpa(\'(1+sqrt(5))/2\')
    or
       s = sym(\'sqrt(5)\')
       phi = vpa((1+s)/2);
 
    Additional examples:
       vpa(pi,780) shows six consecutive 9\'s near digit 770 in the
          decimal expansion of pi.
 
       vpa(hilb(2),5) returns
 
          [    1., .50000]
          [.50000, .33333]

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Matlab读取Excel各个子表的数据进行拟合发布时间:2022-07-18
下一篇:
matlab数据导入verilog仿真发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap