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

2 ビュー (過去 30 日間)
Hema Madhuri
Hema Madhuri 2023 年 8 月 28 日
回答済み: Shreeya 2024 年 5 月 10 日
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

回答 (1 件)

Shreeya
Shreeya 2024 年 5 月 10 日
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.

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by