【发布时间】:2017-05-02 17:52:46
【问题描述】:
我正在尝试计算 D^n 的 lim(n->inf),其中 D 是对角矩阵:
D = [1.0000 0 0 0; 0 0.6730 0 0; 0 0 0.7600 0; 0 0 0 0.7370]
n = 1
L = limit(D^n,n,inf)
这会返回错误: “double”类型的输入参数的未定义函数“limit”。
我确信这会导致除了左上角的条目之外的大多数条目都归零,但我需要能够用 MATLAB 结果来呈现它。我的限制函数中还需要包含其他内容吗?
【问题讨论】:
-
limit是一个符号函数。你确定你的意思不是syms n; L = limit(D^n,1,inf) -
你安装了符号数学工具箱吗?
limit函数需要它... -
你真的需要在 MATLAB 中呈现这个吗?很明显,除了左上角,结果将全部为零。您可以看到除左上角之外的所有对角线的值都小于 1,并且 raising a diagonal matrix to the
nth power would simply take the powers of each diagonal individually to the powernwith the rest of the matrix set to 0。因此,如果|r| < 1和n -> infinity,将它们提高到无限次幂会给你一个零矩阵r^n = 0。 -
更正:左上角的零矩阵除了,当然应该是1。