S-Function using printf in mdlStart
Ältere Kommentare anzeigen
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
...
Antworten (3)
Kaustubha Govind
am 30 Mär. 2012
1 Stimme
Isidro Corral
am 2 Nov. 2016
0 Stimmen
ssPrintf is not working either
Mohammad Kia
am 17 Jun. 2017
0 Stimmen
do not include stdio.h in your code, it will re-target the standard io functions. it will work
Kategorien
Mehr zu Configure C/C++ S-Function Features finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!