??? Unexpected MATLAB operator (:) when using codegen to generate C code

2 vues (au cours des 30 derniers jours)
RW
RW le 28 Oct 2016
Commenté : RW le 28 Oct 2016
I use codegen to generate C code from Matlab code. in the Matlab function, I have a line of code:
a=quantile(double(z(:)), [r 1-r]);
codegen has error when generating C code. Error message: Unexpected MATLAB operator. it is indicating : used in the above line of code. Does anyone know why and how to fix it?

Réponses (1)

James Tursa
James Tursa le 28 Oct 2016
In place of z(:) maybe try reshape(z,numel(z),1)

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by