永发信息网

matlab计算精度控制函数vpa

答案:1  悬赏:80  手机版
解决时间 2021-03-08 23:48
我的matlab版本是2009a,为什么help不到vpa函数?digits也help不到。而且help的document里也搜索不到啊。为什么?如果我想控制运算精度还有什么办法呢?

安装matlab的时候我把安装软件里的所有函数包都安上了。
最佳答案
可以得到帮助。很有可能你的安装包不全。
>> help 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]
See also double, digits.
Overloaded methods:
sym/vpa
>> help digits
DIGITS Set variable precision digits.
Digits determines the accuracy of variable precision numeric computations.
DIGITS, by itself, displays the current setting of Digits.
DIGITS(D) sets Digits to D for subsequent calculations. D is an
integer, or a string or sym representing an integer.
D = DIGITS returns the current setting of Digits. D is an integer.
See also vpa.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
康迪喷码机喷出的字模糊不清楚,数据都正常是
深圳洲石南到深圳龙景小车高速多少钱
焦点百货我想知道这个在什么地方
泡鸭爪怎么做
工程力学 0919 什么是自锁现象西南大学
宏基e1571g装系统u盘启动怎么进不去
下列哪项内容属于《2007版标准文件》第9.4款
井陉县公安局小作派出所地址在哪,我要去那里
银行 终极受益人和剩余风险承担着个人净资产
巨蟹女跟射手男提出分手...
意大利还是西班牙好玩
一岁的宝宝喉咙痛咳嗽声音哑的怎么办
百度贴吧转换模式
永兴斋肉食店这个地址在什么地方,我要处理点
养殖贷款通辽哪里有2016
推荐资讯
截图截到一定范围怎么拉长啊
福来蔬菜店在什么地方啊,我要过去处理事情
杂沟村这个地址在什么地方,我要处理点事
有哪些带通开头的成语
上林中元投资管理有限公司在哪里啊,我有事要
已知,如图,圆O的直径AB与弦CD相交于点E,AE=1,
土建工程砖砌体施工资料怎么做
我公司注册的名称能否被别人再网上注册?请给
用化学方程式表示如何除去括号中的杂质1.KCl[
哈轻一塑公司在什么地方啊,我要过去处理事情
欧洲文艺复兴的实质是A. 古希腊罗马的文化复
“His parents must have gone abroad.” “N
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?