精华内容
下载资源
问答
  • matlab解微分方程

    2010-08-20 15:53:43
    求解 matlab解微分方程 1、学会用Matlab求简单微分方程的解析解. 2、学会用Matlab求微分方程的数值解 a、求简单微分方程的解析解. b、求微分方程的数值解 c、 数学建模实例 d、实验作业.
  • Matlab 解微分方程;一微分方程的解析解;输入命令: y=dsolve'D2y+4*Dy+29*y=0'y(0)=0,Dy(0)=15'x;二微分方程的数值解;二建立数值解法的一些途径;2使用数值积分;3使用泰勒公式; 1在解n个未知函数的方程组时x0和x均...
  • 数学建模与数学实验 Matlab解微分方程 实验目的 实验内容 2学会用Matlab求微分方程的数值解. 1学会用Matlab求简单微分方程的解析解. 1求简单微分方程的解析解. 4作业. 2求微分方程的数值解. 3 数学建模实例 微分方程...
  • MATLAB解微分方程

    2011-08-25 18:59:41
    该资源仅靠能够喝酒诶啊个和广发啊沙发哦阿尔阿尔附近
  • matlab 解微分方程

    2010-12-10 10:39:45
    ode23 ode45 欧拉法 龙格库塔法 matlab
  • matlab解微分方程.pdf

    2008-06-28 17:53:48
    matlab解微分方程.pdf
  • matlab解微分方程

    2021-05-24 20:08:37
    研究了使用matlab如何解微分方程

    研究了使用matlab如何解微分方程。

    考虑如下微分方程。

    {x˙=byy˙=ax,{x(0)=x0y(0)=y0 \left\{\begin{matrix} \dot x = -by \\ \dot y = -ax \end{matrix}\right. ,\quad \left\{\begin{matrix} x(0) = x_0 \\ y(0) = y_0 \end{matrix}\right.

    其解为

    {x=(ax0+by0)eabt+(ax0by0)eabt2ay=(ax0+by0)eabt(ax0by0)eabt2b \left\{\begin{matrix} x = \frac{(\sqrt a x_0 + \sqrt b y_0)e^{-\sqrt{ab}t}+(\sqrt ax_0-\sqrt by_0)e^{\sqrt{ab}t}}{2\sqrt a} \\ y = \frac{(\sqrt a x_0 + \sqrt b y_0)e^{-\sqrt{ab}t}-(\sqrt ax_0-\sqrt by_0)e^{\sqrt{ab}t}}{2\sqrt b} \end{matrix}\right.

    用MATLAB代码来解这个微分方程,代码为

    S1 = dsolve('Dx = -b*y', 'Dy = -a*x', 'y(0) = y0', 'x(0) = x0');
    y = S1.y
    x = S1.x
    

    结果为

    y =
     
    (exp(-t*(a*b)^(1/2))*(a*x0 + y0*(a*b)^(1/2)))/(2*(a*b)^(1/2)) - (exp(t*(a*b)^(1/2))*(a*x0 - y0*(a*b)^(1/2)))/(2*(a*b)^(1/2))
     
     
    x =
     
    (exp(t*(a*b)^(1/2))*(a*x0 - y0*(a*b)^(1/2)))/(2*a) + (exp(-t*(a*b)^(1/2))*(a*x0 + y0*(a*b)^(1/2)))/(2*a)
    

    把结果写成代数形式,为

    {x=eabt(ax0aby0)+eabt(ax0+aby0)2ay=eabt(ax0+aby0)eabt(ax0aby0)2ab \left\{\begin{matrix} x = \frac{e^{\sqrt {ab}t}(ax_0 - \sqrt{ab}y_0) + e^{-\sqrt {ab}t }(ax_0 + \sqrt{ab} y_0) }{2a} \\ y = \frac{e^{- \sqrt {ab}t}(ax_0+ \sqrt{ab}y_0) - e^{\sqrt {ab}t }(ax_0- \sqrt{ab} y_0) }{2\sqrt{ab}} \\ \end{matrix}\right.

    和用手算的结果一样,也就是说用MATLAB可以解代数微分方程。

    展开全文
  • Matlab解微分方程 给出了具体的实例 这是中文版的
  • matlab解微分方程组代码下载pde1d 用于Octave和MATLAB的一维偏微分方程求解器 pde1d在单个空间变量和时间中求解偏微分方程组。 输入大部分与MATLAB函数pdepe兼容。 许多pdepe示例仅需很小的改动就可以与pde1d一起...
  • MATLAB解微分方程

    千次阅读 多人点赞 2019-01-22 18:55:09
    单一微分方程组 S=dsolve(eqn,cond) eqn是微分方程等式,其中微分用diff函数表示,cond是确定微分方程不定系数的条件。注意函数要用带括号的形式定义。即: y(x)=2∗x;y(x)=2*x;y(x)=2∗x; 不能是 y=2∗x;y=2*x...

    解单一微分方程组

    S=dsolve(eqn,cond)

    eqn是微分方程等式,其中微分用diff函数表示,cond是确定微分方程不定系数的条件。注意函数要用带括号的形式定义。即:
    y(x)=2x;y(x)=2*x; 不能是 y=2x;y=2*x;
    确定初始条件时要设置一个新变量:
    Dy=diff(y,x)Dy(0)==1Dy=diff(y,x)\quad Dy(0)==1
    如果没有cond则为解中含有不定系数C。

    举例

    求解微分方程:y3y+3yy=1y'''-3y''+3y'-y=-1
    初始条件 y(0)=y(0)=1,y(0)=2y''(0)=y'(0)=1,\quad y(0)=2
    在这里插入图片描述

    解微分方程组

    Y=dsolve(eqns,cond)

    Y、eqn的形式和solve中的Y相同(参见解方程组部分)

    举例

    {x2y2y=0,x(0)=x(0)=0x2y=2sin(t),y(0)=y(0)=1 \left\{ \begin{aligned} x'-2y''-2y=0,\quad x(0)=x'(0)=0\\ x''-2y'=2sin(t),\quad y(0)=y'(0)=1 \end{aligned} \right. 在这里插入图片描述

    展开全文
  • 好急啊,怎么样用MATLABd的PDE库来解一个有偏微分方程的?该怎么用?最好大神带着一个列子讲一下,感激不尽!![图片说明](https://img-ask.csdn.net/upload/201601/30/1454123703_457539.png)
  • matlab解微分方程

    2020-02-11 23:15:55
    解微分方程组: x’=-x^3-y,x(0)=1 y’=x-y^3,y(0)=0.5 0<t<30 编辑器窗口: %M函数eg6_3fun.m function f=eg6_3fun(t,x) f(1)=-x(1)^3-x(2); f(2)=x(1)-x(2)^3; f=f(????;%注意要保证f为列向量 指令窗口: ...

    解微分方程组:
    x’=-x^3-y,x(0)=1
    y’=x-y^3,y(0)=0.5 0<t<30

    编辑器窗口:
    %M函数eg6_3fun.m
    function f=eg6_3fun(t,x)
    f(1)=-x(1)^3-x(2);
    f(2)=x(1)-x(2)^3;
    f=f(😃;%注意要保证f为列向量

    指令窗口:

    [t,x]=ode45(@eg6_3fun,[0 30],[1;0.5] %1和0.5是初始值

    解应该是x(t),y(t)两个函数
    所以
    把x和y都写成一个x
    x表示一个向量
    x----x(1)
    y----x(2)

    算法本身要求f是列向量,
    所以,f=f(:)

    展开全文
  • 用matlab解常微分方程,调用dsolve是老出错 y=dsolve,用matlab解微分方程y=dsolve(’D2y+Dy2用matlab解常微分方程,调用dsolve是老出错 y=dsolve('Dy=x*sin(x)/cos(y...,用matlab解微分方程y=dsolve('D2y+Dy-2y=2x','y...

    导航:网站首页 >

    用matlab解常微分方程,调用dsolve是老出错 y=dsolve,用matlab解微分方程y=dsolve(’D2y+Dy2

    用matlab解常微分方程,调用dsolve是老出错 y=dsolve('Dy=x*sin(x)/cos(y...,用matlab解微分方程y=dsolve('D2y+Dy-2y=2x','y(0)=0,Dy(0)=1','x')为什...

    匿名网友:

    大哥,你是中英文不分吗?你的程序没错,错的是你把里面很多的括号打成了中文dsolve('200000*D2x+4.5*(Dx)^2=0','200000*D2y=-2000000+4.5*(Dy)^2+30*((Dy)^2+(Dx)^2)','Dx(0)=240','x(0)=0','Dy(0)=0','y(0)=10668','t')不过貌似解不了

    匿名网友:

    > syms x y a;>> dsolve('Dy=-2*x*y/(x^2+2*a)','x')ans =C1/(x^2+2*a)我这里运行没错,你检查一下你的命令中括号等符号是否有问题,是否有输成全角的情况。

    另外注意:语句中要加上‘x',因为matlab默认自变量是t,你这样的式子算出来了也不对。

    匿名网友:

    >> syms x y0>> y=dsolve('Dy=y+1/y','y(0)=y0','x')y = (-1+exp(2*x)*(1+y0^2))^(1/2) -(-1+exp(2*x)*(1+y0^2))^(1/2)>> help dsolve DSOLVE Symbolic solution of ordinary differential equations. DSOLVE('eqn1','eqn2', ...) accepts symbolic equations representing ordinary differential equations and initial conditions. Several equations or initial conditions may be grouped together, separated by commas, in a single input argument. By default, the independent variable is 't'. The independent variable may be changed from 't' to some other symbolic variable by including that variable as the last input argument. The letter 'D' denotes differentiation with respect to the independent variable, i.e. usually d/dt. A "D" followed by a digit denotes repeated differentiation; e.g., D2 is d^2/dt^2. Any characters immediately following these differentiation operators are taken to be the dependent variables; e.g., D3y denotes the third derivative of y(t). Note that the names of symbolic variables should not contain the letter "D". Initial conditions are specified by equations like 'y(a)=b' or 'Dy(a) = b' where y is one of the dependent variables and a and b are constants. If the number of initial conditions given is less than the number of dependent variables, the resulting solutions will obtain arbitrary constants, C1, C2, etc. Three different types of output are possible. For one equation and one output, the resulting solution is returned, with multiple solutions to a nonlinear equation in a symbolic vector. For several equations and an equal number of outputs, the results are sorted in lexicographic order and assigned to the outputs. For several equations and a single output, a structure containing the solutions is returned. If no closed-form (explicit) solution is found, an implicit solution is attempted. When an implicit solution is returned, a warning is given. If neither an explicit nor implicit solution can be computed, then a warning is given and the empty sym is returned. In some cases involving nonlinear equations, the output will be an equivalent lower order differential equation or an integral. Examples: dsolve('Dx = -a*x') returns ans = C1*exp(-a*t) x = dsolve('Dx = -a*x','x(0) = 1','s') returns x = exp(-a*s) y = dsolve('(Dy)^2 + y^2 = 1','y(0) = 0') returns y = sin(t) -sin(t) S = dsolve('Df = f + g','Dg = -f + g','f(0) = 1','g(0) = 2') returns a structure S with fields S.f = exp(t)*cos(t)+2*exp(t)*sin(t) S.g = -exp(t)*sin(t)+2*exp(t)*cos(t) dsolve('Dy = y^2*(1-y^2)') returns Warning:Explicit solution could not be found; implicit solution returned. ans = t+1/2*log(y-1)-1/2*log(y+1)+1/y+C1=0 dsolve('Df = f + sin(t)', 'f(pi/2) = 0') dsolve('D2y = -a^2*y', 'y(0) = 1, Dy(pi/a) = 0') S = dsolve('Dx = y', 'Dy = -x', 'x(0)=0', 'y(0)=1') S = dsolve('Du=v, Dv=w, Dw=-u','u(0)=0, v(0)=0, w(0)=1') w = dsolve('D3w = -w','w(0)=1, Dw(0)=0, D2w(0)=0') y = dsolve('D2y = sin(y)'); pretty(y) See also solve, subs.Reference page in Help browser doc dsolve

    匿名网友:

    >>clear>>syms a b c d e;>>y=dsolve('a*D2y+b*Dy+c*y=0','y(0)=d','Dy(0)=e')y =(2*a*e + b*d + d*(b^2 - 4*a*c)^(1/2))/(2*exp((t*(b - (b^2 - 4*a*c)^(1/2)))/(2*a))*(b^2 - 4*a*c)^(1/2)) - (2*a*e + b*d - d*(b^2 - 4*a*c)^(1/2))/(2*exp((t*(b + (b^2 - 4*a*c)^(1/2)))/(2*a))*(b^2 - 4*a*c)^(1/2))>>a=1;b=1;c=1;d=1;e=1;%若常数已知>>t=1;%desolve中没指定自变量x,这里默认为t,带入任意一个x值>>y=eval(y) y =1.1932 + 0.0000i这是解方程的方法,画图也差不多,我在命令窗写的改麻烦,下面是我在editor写的。

    syms a b c d e;y=dsolve('a*D2y+b*Dy+c*y=0','y(0)=d','Dy(0)=e','x');x=200:0.1:400;%取值范围,步长a=1;b=1;c=1;d=1;e=1;%带入参数y=eval(y);plot(x,y)你补充问题的方程解得也是一个空的,并报错,或许就是无解的,我也很疑问。

    问题推荐

    展开全文
  • 刚性非刚性微分方程matlab详细解释 不错哦
  • matlab解微分方程组代码下载大会17 该存储库包含ASEE 2017论文中描述的MATLAB代码和代码段。 该存储库中的代码需要MATLAB的偏微分方程工具箱(pdetool)。 讲师可以下载该材料并用于其课程。 请适当地引用此工作...
  • matlab解微分方程的Euler法

    千次阅读 2020-08-20 09:08:43
    h = 0.1; tn = 1; t=(0:h:tn)'; n=length(t); y=1*ones(n,1); for k=2:n y(k)=y(k-1)+h*feval(t(k-1),y(k-1)); end plot(t, y, 'sb-') function dfun=feval(t, y) dfun=t - 2*y; end

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,071
精华内容 428
关键字:

matlab解微分方程

matlab 订阅