Code generation does not support cell arrays in structure fields
显示 更早的评论
Dear All , I am getting 'Code generation does not support cell arrays in structure fields' error while trying to generate code for a matlab function. I am passing a cell array to odeset functions which in turn is a sparcity matrix.
reult_wp = odeset( 'reltol', 1e-04 , 'JPattern' {wb_1, wb_2})
wb_1 and wb_2 are sparcity matrix and size is 150x150 for both.
Please help me to resolve this issue.
Regards, Sanjeev
3 个评论
sanjeev kumar
2018-10-31
sanjeev kumar
2018-11-21
Adam Danz
2018-11-21
Using fake (nonsense) data, I don't have any problems.
A = [ 0 0 0 5
0 2 0 0
1 3 0 0
0 0 4 0];
B = A';
reult_wp = odeset( 'reltol', 1e-04 , 'JPattern', {A, B})
First check that wb_1 and wb_2 are indeed matrices. If that's confirmed, copy and paste the entire error message into the comments section and the line of code generating the error (which I assume is the only line you shared).
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!