Output of [~,IDX] = max(...) not in DOUBLE but in INT.

조회 수: 3 (최근 30일)
Roman Foell
Roman Foell 2021년 10월 25일
댓글: Roman Foell 2021년 10월 25일
Hi together,
I want to output the index of the maximum value of max() not in double, but in int.
Is there an easy way to do this?
Because of interest, I want to generate C Code, thats why int format would be more efficent.
Thanks for your answer.

답변 (1개)

KSSV
KSSV 2021년 10월 25일
You can convert double into integer using int32 ot int64.
  댓글 수: 1
Roman Foell
Roman Foell 2021년 10월 25일
Thanks, I know, but I do not want get an output as double and then transform it to int. I want to define it from the beginning as int.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by