如何在MATLAB中更改已求解方程的显示 [英] How to change display of solved equations results in matlab

查看:81
本文介绍了如何在MATLAB中更改已求解方程的显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我求解三个方程组时,我得到了:

When I solved system of three equations I got e.g.:

ans =

(220187671*1019780050779217710933721438668552804739490^(1/2))/130153889126365944306728960 - 2474730277849696199777672339/3425102345430682744913920
 - (220187671*1019780050779217710933721438668552804739490^(1/2))/130153889126365944306728960 - 2474730277849696199777672339/3425102345430682744913920

如何将结果更改为点后3个位置的精度?例如:

How can I change this result to result with accuracy of 3 places after dot? for example:

ans = 123.123

推荐答案

vpa(variable,3)

这将显示变量",其精度为3个十进制数字.

This will display 'variable' with 3 decimal digit accuracy.

这篇关于如何在MATLAB中更改已求解方程的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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