필터 지우기
필터 지우기

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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by