Code generation does not support cell arrays in structure fields
Show older comments
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 Comments
sanjeev kumar
on 31 Oct 2018
sanjeev kumar
on 21 Nov 2018
Adam Danz
on 21 Nov 2018
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).
Answers (0)
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!