如何以多于4位小数的形式显示矩阵中的数据 [英] how to Display data in matrix with with more than 4 decimals

查看:63
本文介绍了如何以多于4位小数的形式显示矩阵中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是关于这个matlab的 输出:

My question is about this matlab output:

>>model3.Mu

ans =

0.7677    -1.1755   -0.8956

-0.0100    0.0883    0.0235

0.0001    -0.0010   -0.0003

-0.0000    0.0000    0.0000

如何在4x3的矩阵中以多于4个小数的形式显示此数据?

How to display this data in a 4x3 matrix with more than 4 decimals?

推荐答案

type:

>> help format

我认为您想做的是在执行脚本之前发出命令"FORMAT LONG".

I think what you want to do is issue the command "FORMAT LONG" before you execute your script.

您还可以循环使用fprintf将矩阵打印到任意精度.

You can also print the matrix out to arbitrary precision using fprintf in a loop.

这篇关于如何以多于4位小数的形式显示矩阵中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆