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 个评论

Dear All,
Please let me know guys if anyone came across such kind of issue and was able to resolve it.
Dear All ,
Any help on this would be grateful :)
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 的更多信息

评论:

2018-11-21

Community Treasure Hunt

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

Start Hunting!

Translated by