以前只有matlab的常见问题,现在也有Mathematica的常见问题 >************************************************************************< =================================== - [返回] 1).Mathematica 可以定义变量为实数么? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/6/22.BigGreen/en_Mathematica # 1. 在Simplify/FullSimplify可以使用\[Element],如 Simplify[Re[a+b*I],a\[Element]Reals] 2. 可以使用ComplexExpand[]来展开表达式,默认:符号均为实数: Unprotect[Abs]; Abs[x_] := Sqrt[Re[x]^2 + Im[x]^2]; ComplexExpand[Abs[a + b*I], a] 3. 使用/:,对符号关联相应的转换规则 x /: Im[x] = 0; x /: Re[x] = x; y /: Im[y] = 0; y /: Re[y] = y; Re[x+y*I] =================================== - [返回] 2).Mathematica中如何中断运算? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/6/22.BigGreen/en_Mathematica# Alt+. 直接终止当前执行的运算 Alt+, 询问是否终止或者继续 如果不能终止,用菜单Kernel\Quit Kernal\Local来退出当前运算 =================================== - [返回] 3).请高手推荐Mathematica参考书 :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/6/22.BigGreen/en_Mathematica# 我迄今为止看到的最好的一本就是Mathematica自己带的帮助里面 的The Mathematica Book,内容全面,循序渐近,非常容易学习使用 。其他所见到的一些中文书籍基本上都是直接翻译帮助的内容,没有 什么新意。 =================================== - [返回] 4).请问在Mathematica中如何画极坐标图? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/6/4. SMTH/MathTools # << Graphics`Graphics` PolarPlot[] PolarListPlot[] =================================== - [返回] 5).Mathematica中如何对离散点作积分? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/5/9. SMTH/MathTools# 离散的点通过插值或者拟合就可以得到连续的函数,然后可以对该函 数求积分和微分。下面是一个例子: f[x_] := NIntegrate[Sin[Cos[x]], {x, 0, a}]; data = Table[{a, f[x]}, {a, 0, 10}]; expr = Interpolation[data]; Plot[expr[a], {a, 0, 10}]; Plot[Evaluate[D[expr[a], a]], {a, 0, 10}] 如果想实现Matlab中的cumsum的功能: Drop[FoldList[Plus, 0, {a1,a2,…,an}], 1] =================================== - [返回] 6).在Mathematica中创立palette? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/6/18. SMTH/MathTools# 在帮助中查找"Creating Palettes (Windows)" =================================== - [返回] 7).Mathematica可以作用户界面吗? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/5/31. SMTH/MathTools# Mathematica的GUI设计是通过它的交互式的NoteBook实现的,可以参 考Mathematica帮助文件中的demo例子,或参考帮助2.10.6 =================================== - [返回] 8).Mathematica中如何使用中文? :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/7/23. BigGreen/en_Mathematica# Mathematica3/4/4.1中如果使用中文,需要先选中所在的cell,或者选中 输入的中文乱码,在菜单format font中选中对应的中文字体后才能正确 显示。 最新的4.2在国际化有较大的改进,可以直接输入中文,参见 http://www.wolfram.com/products/mathematica/newin42/publishing.html<;/A> =================================== - [返回] 9)..Mathematica中如何使用Solve[]求解的结果?(FangQ) :#FangQ(Qianqian.Fang@dartmouth.edu), 2002/11/19. BigGreen/en_Mathematica# Solve[]求解的结果是以一个"表"或者"替换规则"的形式给出来的, 并没有把结果真正替换给未知量。如果 sol = Solve[a*x^2 + b*x + c == 0, x]; x=x /. sol[[1]] 也可以使用对表元素的操作把结果取出来,比如在上面的例子中: x1=sol[[1,1,2]] x2=sol[[2,1,2]] |
GMT+8, 2025-4-8 04:34 , Processed in 0.052690 second(s), 23 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.