How to eleminate 'clock' error generated during code generation.
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi all In my model I need to know what time of the day it is. So I have written a matlab function that uses matlab function 'clock'.I get back an array, which i read to extract the time of the day. The problem starts only when I try to generate c code from the model, I get the following error :'Failed to eliminate a call to the MATLAB function 'clock'. For non-simulation builds, calls to unsupported MATLAB functions are eliminated if they do not affect function outputs.'
What can I do as to eliminate this error and be able to read in system time and also be able to generate c code with it?
댓글 수: 2
채택된 답변
Vishal Rane
2013년 6월 10일
Refer this list of functions allowed from code gen perspective :
One way would be to use a C/C++ equivalent of the 'clock' function in the form of sfunc.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!