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

3 ビュー (過去 30 日間)
RW
RW 2016 年 10 月 28 日
コメント済み: RW 2016 年 10 月 28 日
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?

回答 (1 件)

James Tursa
James Tursa 2016 年 10 月 28 日
In place of z(:) maybe try reshape(z,numel(z),1)

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by