Sparse Support for MATLAB Coder
조회 수: 13 (최근 30일)
이전 댓글 표시
Does the MATLAB Coder support sparse Matrices created for example with the sparse() function? Something like
A = sparse(zeros(4,4));
A(3,3) = 1.0;
Thanks in advance
댓글 수: 0
답변 (3개)
Walter Roberson
2011년 7월 12일
Use the syntax
t=coder.newtype(numeric_class, sz, variable_dims, Name, Value)
with Name being 'sparse' and Value being true:
t=coder.newtype(numeric_class, sz, variable_dims, 'sparse', true)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!