设计教室
设计欣赏|图形图像|媒体动画|机械电子|CI设计|设计文献|PhotoShop|Corel3Dmax|Flash|AutoCad|设计视频
首页 > 设计教室 > 机械电子 > MATLAB > 正文

Matlab 利用MAPLE的深层符号计算资源


6.7 利用MAPLE的深层符号计算资源
6.7.2 MAPLE库函数在线帮助的检索树

(1)翻阅Maple在线帮助的索引类目的指令是mhelp index
mhelp index % 查看 Maple 在线帮助的索引类目
Index of help descriptions
Calling Sequence:
?index[category] or help(index, category);
Description:
- The following categories of topics are available in the help subsystem:
index[expression]##expression operators for forming expressions
index[function]##function list of Maple functions
index[misc]##misc miscellaneous facilities
index[package]##packages descriptions of library packages
index[procedure]##procedure topics related to procedures and programming
index[statement]##statement list of Maple statements
To access these help pages, you must prefix the category with index, thus ?
index[category].

(2) 深入Maple的具体分类目录的指令格式是mhelp index[category]
mhelp index[function]
Index of descriptions for standard library functions
Description:
- The following are the names of Maple's standard library functions. For more information, see ?f where f is any of
these functions.
AFactor##AFactor AFactors##Afactors
AiryZeros##AiriAiZeros AiryZeros##AiriBiYZeros
Airy##AiryAi Airy##AiryBi
AngerJ##AngerJ Berlekamp##Berlekamp
Bessel##BesselI Bessel##BesselJ
...... ......
...... ......
hattype##whattype with##with
worksheet##worksheet writebytes##writebytes
writedata##writedata writeline##writeline
writestat##writestat writeto##writeto
zip##zip ztrans##ztrans

See Also:
readlib##readlib, libname##libname, index[package]##index[package]

(3)获取具体函数使用方法说明的指令格式是mhelp fun_name


6.7.3 发挥MAPLE的计算潜力
6.7.3.1 调用MAPLE函数

【 * 例 6.7.3 .1-1 】求递推方程 的通解。
(1)调用格式一
gs1=maple('rsolve(f(n)=-3*f(n-1)-2*f(n-2),f(k));')
gs1 =
(2*f(0)+f(1))*(-1)^k+(-f(0)-f(1))*(-2)^k

(2)调用格式二
gs2=maple('rsolve','f(n)=-3*f(n-1)-2*f(n-2)','f(k)')
gs2 =
(2*f(0)+f(1))*(-1)^k+(-f(0)-f(1))*(-2)^k

【 * 例 6.7.3 .1-2 】求 的 Hessian 矩阵。
(1)调用格式一
FH1=maple('hessian(x*y*z,[x,y,z]);')
FH1 =
matrix([[0, z, y], [z, 0, x], [y, x, 0]])

(2)调用格式二
FH2=maple('hessian','x*y*z','[x,y,z]')
FH2 =
matrix([[0, z, y], [z, 0, x], [y, x, 0]])

(3)把以上输出变成“符号”类
FH=sym(FH2)
FH =
[ 0, z, y]
[ z, 0, x]
[ y, x, 0]

【 * 例 6.7.3 .1-3 】求 处展开的截断 8 阶小量的台劳近似式。
(1)直接运行 mtaylor , 展开失败。
TL1=maple('mtaylor(sin(x^2+y^2),[x=0,y=0],8)')
TL1 =
mtaylor(sin(x^2+y^2),[x = 0, y = 0],8)

(2)必须先“读库”,才能得到正确展开结果。
maple('readlib(mtaylor);');
TL2=maple('mtaylor(sin(x^2+y^2),[x=0,y=0],8)');
pretty(sym(TL2))
2 2 6 2 4 4 2 6
x~ + y - 1/6 x~ - 1/2 y x~ - 1/2 y x~ - 1/6 y


6.7.3.2 运行MAPLE程序

【 * 例 6.7.3 .2-1 】目标:设计求取一般隐函数

上一篇: Matlab 编译文件的性能优化
下一篇:Matlab 符号微积分

评论  点击查看
 
设计频道推荐
设计热点文章