S-Function using printf in mdlStart
이전 댓글 표시
I would like to debug my S-Function C code using "printf", but why the mdlStart is not able to print anything out?
static void mdlInitializeSizes {
printf("mdlInitSizn");
}
static void mdlInitializeSampleTimes {
printf("mdlInitTime\n");
}
static void mdlStart(SimStruct *S) {
printf("mdlStart\n");
}
static void mdlOutputs {
print("mdlOutputs\n");
}
OUTPUT:
mdlInitSiz
mdlInitTime
mdlOutputs
mdlOutputs
...
답변 (3개)
Kaustubha Govind
2012년 3월 30일
1 개 추천
Isidro Corral
2016년 11월 2일
0 개 추천
ssPrintf is not working either
Mohammad Kia
2017년 6월 17일
0 개 추천
do not include stdio.h in your code, it will re-target the standard io functions. it will work
카테고리
도움말 센터 및 File Exchange에서 Configure C/C++ S-Function Features에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!