【问题标题】:Matlab: How to prevent Matlab from cutting decimals in array? [duplicate]Matlab:如何防止Matlab在数组中截取小数? [复制]
【发布时间】:2017-06-29 09:56:54
【问题描述】:

是否可以在逗号后有 16 位小数的数组中得到它? 正如您在下面的链接中看到的那样,它在我的工作区中被切断了。 亲切的问候!

format long;
startYCoordinateNorthEast=([50.93952193697642, 6.99745722361763]);

here you can see the array, cut to 4 decimals but I need 16

【问题讨论】:

  • MATLAB 不截取小数,它显示少了小数

标签: matlab floating-point format decimal precision


【解决方案1】:

在您的 Matlab 工作区中,format long 将向您显示长输出是对的:

>> startYCoordinateNorthEast

startYCoordinateNorthEast =

  50.939521936976419   6.997457223617630

在工作区查看器中,要查看所有小数,您必须单击名为“查看”的选项卡。从那里,在“数字显示格式”下选择“长固定十进制”

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-16
    • 2018-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多