MATLAB提供了办理微分和积分微积分的各类要领，求解任何水平的微分方程和极限计较。可以轻松绘制巨大成果的图形，并通过求解原始成果以及其衍生来查抄图形上的最大值，最小值和其他牢靠点。

## 计较极限

MATLAB提供计较极限的`limit`函数。在其最根基的形式中，`limit`函数将表达式作为参数，并在独立变量为零时找到表达式的极限。

``````syms x
limit((x^3 + 5)/(x^4 + 7))
``````

``````Trial>> syms x
limit((x^3 + 5)/(x^4 + 7))

ans =

5/7
``````

`limit`函数落在标记计较域; 需要利用`syms`函数来汇报MATLAB正在利用的标记变量。还可以计较函数的极限，因为变量趋向于除零之外的某个数字。要计较 -

``````limit((x - 3)/(x-1),1)
``````

``````ans =
NaN
``````

``````limit(x^2 + 5, 3)
``````

``````ans =
14
``````

## 利用Octave计较极限

``````pkg load symbolic
symbols
x=sym("x");

subs((x^3+5)/(x^4+7),x,0)
``````

``````ans =
0.7142857142857142857
``````

## 验证极限的根基属性

``````f(x) = (3x + 5)/(x - 3)
g(x) = x^2 + 1.
``````

``````syms x
f = (3*x + 5)/(x-3);
g = x^2 + 1;
l1 = limit(f, 4)
l2 = limit (g, 4)
lAdd = limit(f + g, 4)
lSub = limit(f - g, 4)
lMult = limit(f*g, 4)
lDiv = limit (f/g, 4)
``````

``````l1 =
17

l2 =
17

34

lSub =
0

lMult =
289

lDiv =
1
``````

## 利用Octave验证极限的根基属性

``````pkg load symbolic
symbols

x = sym("x");
f = (3*x + 5)/(x-3);
g = x^2 + 1;

l1=subs(f, x, 4)
l2 = subs (g, x, 4)
lAdd = subs (f+g, x, 4)
lSub = subs (f-g, x, 4)
lMult = subs (f*g, x, 4)
lDiv = subs (f/g, x, 4)
``````

``````l1 =

17.0
l2 =

17.0

34.0
lSub =

0.0
lMult =

289.0
lDiv =

1.0
``````

## 阁下界线极限

``````f(x) = (x - 3)/|x - 3|
``````

Matlab教程

2017-11-02

MATLAB提供了办理微分和积分微积分的各类要领，求解任何水平的微分方程和极限计较。可以轻松绘制巨大成果的图形，并通过求解原始成果以及其衍生