フィルターのクリア

Array Access in Symbolic Calculations

1 回表示 (過去 30 日間)
Nicholas Dinsmore
Nicholas Dinsmore 2013 年 3 月 8 日
I am using the symbolic math toolbox to turn an ugly recursive algorithm that accesses and array into a matlab function. Everything is working but I keep getting a warning message that makes me think I am declaring the array as a function which I think is a bit hacky. I am hoping someone can point me to a better method.
Here is how I am doing it:
i=sym('i');
assume(i,'integer');
ArrayVar= symfun(sym('ArrayVar(i)'), [i]);
...%inset recursive Algorithm here
matlabFunction(RecursiveResult,'file','FlattenedAlgorithm.m','vars',{'index','ArrayVar'});
Like I said that works but when I run it I get a warning message that I am hoping with better representation of the array I could avoid. The warning message is "Warning: Function "ArrayVar" is not verified to be a valid MATLAB function.". I could just suppress the message but before I do that I wanted to make sure there wasn't a better way to access the array without pretending it is a function.

回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by