フィルターのクリア

How do I preallocate symbolic matrix?

43 ビュー (過去 30 日間)
Shawn Miller
Shawn Miller 2016 年 2 月 28 日
コメント済み: Hernán Moreno 2021 年 7 月 7 日
I got the warning of preallocation when I tried to change the size of my 1*n symbolic array (elements are symbolic expressions) every time I added a new element. So I wonder how do I allocate symbolic array like zeros(n) in numeric array? Does zeros(m,n,'sym') or sym(zeros(m,n)) work or whatever really works and would increase speed?

採用された回答

Walter Roberson
Walter Roberson 2016 年 2 月 28 日
sym(zeros(m,n)) is good and would increase your speed.
  1 件のコメント
Hernán Moreno
Hernán Moreno 2021 年 7 月 7 日
helpful, thanks :D

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by