How to generate new line instead of \n, when using c printf in Stateflow

2 Ansichten (letzte 30 Tage)
Jalil
Jalil am 4 Apr. 2013
Hi, I would like to use C printf in Stateflow charts and i'm tryng to print tab and new line. The transition code looks like : { printf("Waiting \t My program \n"); }
In simulation it's working fine, text is correctly printed in Matlab console, but the generated code by "Embedded coder" looks like : printf("Waiting \\t My program \\n");
How to prevent code generation to add '\' before new line and tab ? Thanks

Antworten (1)

Kushagra
Kushagra am 4 Mai 2013
try char(10)

Kategorien

Mehr zu Stateflow finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by