Sparse Support for MATLAB Coder
11 次查看(过去 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!