2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > Matlab中vpa一直在忙 matlab数据类型转换遇到问题 及解决办法 sym double vpa转换...

Matlab中vpa一直在忙 matlab数据类型转换遇到问题 及解决办法 sym double vpa转换...

时间:2023-06-16 16:30:29

相关推荐

Matlab中vpa一直在忙 matlab数据类型转换遇到问题 及解决办法 sym double  vpa转换...

vpa

Variable precision arithmetic

变量精度计算

Syntax

R =vpa(A)

R =vpa(A, d)

Description

R =vpa(A)uses variable-precision arithmetic (VPA) to compute each element ofAtoddecimal digits of accuracy, wheredis the current setting ofdigits. Each element of the result is a symbolic expression_r.

R =vpa(A, d)usesddigits, instead of the current setting ofdigits.

R =vpa(A)利用变量精度计算方法以d为小数点精度去计算A中的每个元素,其中d是当前的小数点设置(digits).每个输出的元素是符号表达式.

R =vpa(A, d)利用d为digits精度代替当前的digits设置.(其实就是小数点后的位数)

Examples

The statements

digits(25) q =vpa(sin(sym('pi')/6)) p =vpa(pi) w =vpa('(1+sqrt(5))/2')

return

q = 0.5 p = 3.141592653589793238462643w = 1.618033988749894848204587

vpapi 75computesπto75digits.

The statements

A =vpa(hilb(2),25) B =vpa(hilb(2),5)

return

A = [ 1.0, 0.5] [ 0.5, 0.3333333333333333333333333] B = [ 1.0, 0.5] [ 0.5, 0.33333]

matlab错误提示

The following error occurred converting from sym to double:

Error using mupadmex

Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.

If the input expression contains a symbolic variable, use the VPA function instead.

Error in hRefinement2d (line 103)

newprojcoord(wcpindex,:) = tempcontrolPoints;

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。