using codegen hist(z, sqrt(length(z)) error scalar X must be constant
Show older comments
I use codegen to generate C code from Matlab code. in a Matlab sub-function, I have a line of code:
[nz, bins] = hist(z, sqrt(length(z)));
error message underlines this line, saying "scalar X must be constant". Does anyone know how to make it work the way it is designed but not violating codegen rules?
Thanks a lot!
Accepted Answer
More Answers (1)
RW
on 31 Oct 2016
0 votes
Categories
Find more on Function Definition 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!