フィルターのクリア

S-Function using printf in mdlStart

5 ビュー (過去 30 日間)
Sam
Sam 2012 年 3 月 30 日
回答済み: Mohammad Kia 2017 年 6 月 17 日
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
Kaustubha Govind 2012 年 3 月 30 日
You need to use ssPrintf.

Isidro Corral
Isidro Corral 2016 年 11 月 2 日
ssPrintf is not working either

Mohammad Kia
Mohammad Kia 2017 年 6 月 17 日
do not include stdio.h in your code, it will re-target the standard io functions. it will work

製品

Community Treasure Hunt

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

Start Hunting!

Translated by