how to make "if strcmp(cod​er.target,​'rtw')" true in model simulation.

3 Ansichten (letzte 30 Tage)
Hema Madhuri
Hema Madhuri am 28 Aug. 2023
Beantwortet: Shreeya am 10 Mai 2024
There is an if statement in code which is not becoming true. Please suggest how to make it true.
if strcmp(coder.target,'rtw')
system target file is set as ert.tlc

Antworten (1)

Shreeya
Shreeya am 10 Mai 2024
Hello
coder.target("target") function returns 1 if the code generation target is set to "target", else it return 0. You can use this function directly to check the system target file, instead of employing strcmp. You can also refer to the link below to understand the implementation.

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by