Can anyone please tell me why I am getting this error?

A =
2 4 1
3 1 4
5 6 0
>> A=finverse(A) Undefined function 'finverse' for input arguments of type 'double'.
>>

回答 (3 件)

Star Strider
Star Strider 2014 年 8 月 27 日
編集済み: Star Strider 2014 年 8 月 27 日

1 投票

The finverse function is in the Symbolic Math Toolbox, and creates the inverse of a symbolic function.
You likely want the inv function for your matrix. If you are doing matrix calculations, it is preferable to use the mldivide function, or more directly the (\) (backslant) operator (if possible in your calculations).

3 件のコメント

Star Strider
Star Strider 2014 年 8 月 27 日
The easiest way to invert your matrix then is simply to use inv. If you want to use the Symbolic Math Toolbox, declare your A matrix as a symbolic object first:
syms A
A = [2 4 1
3 1 4
5 6 0]
Ainv = inv(A)
It will still be a double data type, so there is no advantage to doing it as a symbolic object.
Christopher Creutzig
Christopher Creutzig 2014 年 8 月 29 日
Your sequence of commands does not create a symbolic matrix. The assignment to A discards the previous symbolic variable A.
A = sym([2 4 1
3 1 4
5 6 0])
inv(A)
ans =
[ -8/15, 2/15, 1/3]
[ 4/9, -1/9, -1/9]
[ 13/45, 8/45, -2/9]
Star Strider
Star Strider 2014 年 8 月 29 日
@Christopher — Noted. You’re correct.

サインインしてコメントする。

Image Analyst
Image Analyst 2014 年 8 月 27 日

0 投票

finverse() is not in base MATLAB. Do you think it is suppose to be in one of your toolboxes? If so, which one? List in in the products drops down list below this comment. Or is it a custom function you wrote but did not include here?

2 件のコメント

Iain
Iain 2014 年 8 月 27 日
Or, is it just a typo?
Andrew Reibold
Andrew Reibold 2014 年 8 月 27 日
Symbolic Math Toolbox

サインインしてコメントする。

Segun
Segun 2014 年 8 月 27 日

0 投票

Thanks Star Strider & image analyst. I am just interested in creating the inverse of the matrix. The Symbolic toolbox is included. I checked using vers cmd.

カテゴリ

タグ

質問済み:

2014 年 8 月 27 日

コメント済み:

2014 年 8 月 29 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by