数学实验6--Matlab符号运算详解.pptx

  1. 1、本文档共47页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数学实验6--Matlab符号运算详解

数学实验(Matlab版);课程安排;6 Matlab符号运算—作业1;用Matlab的符号运算工具箱MuPAD notebook完成以下任务 用本次课程所讲的符号画图命令完成函数的画图 完成上次作业的所有内容 保存成notebook文件,并用File-Export 导出为pdf文档提交 自学用户界面设计;Symbolic Objects 符号对象;5/25/2016;Symbolic Objects---Symbolic Numbers;use a symbolic variable to represent the golden ratio phi = sym((1 + sqrt(5))/2); f = phi^2 - phi – 1 f=(5^(1/2)/2 + 1/2)^2 - 5^(1/2)/2 - 3/2 syms a b c x f = sym(a*x^2 + b*x + c);;create an arbitrary symbolic function syms f(x, y) creates the symbolic function f and symbolic variables x and y sym only creates the function syms x y f(x, y) = sym(f(x, y)‘) ;syms a b c A = [a b c; c a b; b c a] A = [ a, b, c] [ c, a, b] [ b, c, a] sum(A(1,:)) ans=a+b+c;Symbolic Computations--expand(); f=(x+y)^3; f1=expand(f) f1 = x^3 + 3*x^2*y + 3*x*y^2 + y^3; syms x n c alph beta; e10=sin(x)^2+cos(x)^2; e1=simplify(e10); e20=exp(c*log(alph+beta)); e2=simplify(e20) e1=1 e2 =(alph + beta)^c; syms x y ; collect(x^2*y+y*x-x^-2*x) ans = (y*x^3 + y*x^2 - 1)/x; syms x; f=x^3+x^2-x-1; f1=factor(f) f1 = (x - 1)*(x + 1)^2;Symbolic Computations—numden(); f=(x^2-1)*(x^4+x^3+x^2+x+1)*(x^4-x^3+x^2-x+1); subs(f,1/3) ans = -1.0000 f f = (x^2 - 1)*(x^4 - x^3 + x^2 - x + 1)*(x^4 + x^3 + x^2 + x + 1) ;Symbolic Computations--solve() Solve equations; solve(a*x^2+b*x+c) % solve(a*x^2+b*x+c=0) ans = -(b + (b^2 - 4*a*c)^(1/2))/(2*a) -(b - (b^2 - 4*a*c)^(1/2))/(2*a); x=sym(x); diff(cos(x)^2) ans = -2*cos(x)*sin(x) x=sym(x); diff(cos(x^2)) ans = -2*x*sin(x^2) ; syms x a b; %定积分 int(x^2,a,b) ans = b^3/3 - a^3/3 syms x; %不定积分 int(x) ans =x^2/2 ;Symbolic Computations—dsolve() ODEs: ordinary differential equations 微分方程求解; syms f(t) g(t) S = dsolve(diff(f) == f + g, diff(g) == -f + g,f(0) == 1,g(0) == 2) S = g: [1x1 sym] f: [1x1 sym] S.f = exp(t)*cos(t) + 2*exp(t)*sin(t) S.g = 2*exp(t)*cos(t) - exp(t)*sin(t); syms y(t) a Dy = diff(y); D2y = diff(y,2); dsolve(D2y == -a^2*y, y(0) == 1, Dy(pi/a) == 0) ans =exp(-a*t*i)/2 +e

文档评论(0)

jiayou10 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8133070117000003

1亿VIP精品文档

相关文档