数模论坛

 找回密码
 注-册-帐-号
搜索
热搜: 活动 交友 discuz
查看: 3806|回复: 0

[讨论]Mathematica的常见问题

[复制链接]
发表于 2003-7-30 16:48:50 | 显示全部楼层 |阅读模式
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在国际化有较大的改进,可以直接输入中文,参见
        <A TARGET=_blank HREF="http://www.wolfram.com/products/mathematica/newin42/publishing.html">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[]求解的结果是以一个&quot;表&quot;或者&quot;替换规则&quot;的形式给出来的,
        并没有把结果真正替换给未知量。如果
        
        sol = Solve[a*x^2 + b*x + c == 0, x];
        x=x /. sol[[1]]
        
        也可以使用对表元素的操作把结果取出来,比如在上面的例子中:
        
        x1=sol[[1,1,2]]
        x2=sol[[2,1,2]]        
        
您需要登录后才可以回帖 登录 | 注-册-帐-号

本版积分规则

小黑屋|手机版|Archiver|数学建模网 ( 湘ICP备11011602号 )

GMT+8, 2024-4-19 17:28 , Processed in 0.049791 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表