Unable to use "cholupdate" in a Simulink Matlab function made for C code generation

6 ビュー (過去 30 日間)
Johan
Johan 2013 年 7 月 31 日
回答済み: Mohd Aifaa 2013 年 10 月 9 日
I have made a model in Simulink that contains a Matlab function block. When I try to use "cholupdate" I only get the following error: "Undefined function or variable 'cholupdate'."
Is it not possible to use cholupdate in a Simulink Matlab function (made for automatic C code generation)? I use Matlab R2013a and I can use cholupdate outside of Simulink.
"Chol" seems to work and I also get the help text for cholupdate in the editor.
If it is not possible to use cholupdate I would appreciate if someone could show me / post a link on how to implement it myself! I am looking for the Cholesky factor of then rank 1 downdate.

回答 (2 件)

Ryan Livingston
Ryan Livingston 2013 年 8 月 1 日
CHOLUPDATE is not supported for code generation. You can see an exhaustive list of functions which are supported here:

Mohd Aifaa
Mohd Aifaa 2013 年 10 月 9 日
try this for cholesky factor rank 1 update/downdate without using cholupdate
R1=chol(R'*R+x*x'); (update) R1=chol(R'*R-x*x'); (downdate)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by