Printing syms / matlabFunction slow
古いコメントを表示
Hi all,
I am having a lot of trouble trying to make my symbolic code go faster.
I am creating a complicated function f, and calculating its jacobian df. This goes at a reasonable pace, and I can save it to a file just fine. But when I try to use matlabFunction or even disp or fprintf, the system hangs and is unable to proceed further (even when matlabFunction is set to unoptimized). This is a major problem as I need to be able to do reasonably fast substitution.
The f vector is 24 elements, and the Jacobian is 24 x 78 (there are only 70 variables that show up here though, so this could be compressed down to 70 columns; I doubt this is the issue though).
I also know that certain elements which are simple work fine, but certain, more complicated elements of f and df cannot be displayed. I imagine they are very long, but since they are calculated just fine, it doesn't make sense to me that they cannot be transformed into a matlabFunction or displayed.
Even more bizarrely, I can substitute in for all my symbolic variables, but then the final display of the fully substituted f vector, or the conversion to double seems to take forever.
I'm attaching the file. What can I do to write out this file in a reasonable amount of time?
Thank you for your time.
3 件のコメント
Steven Lord
2015 年 10 月 15 日
I don't see any attached file.
Andrew Spielberg
2015 年 10 月 15 日
Joel Rosenfeld
2018 年 5 月 3 日
I'm facing the same issue with matlabFunction. Did you ever get this resolved?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Code Performance についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!