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

조회 수: 2 (최근 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 CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by