Hello, I need help to resolve this error, please.

5 件のコメント

Danikha Shyken
Danikha Shyken 2023 年 9 月 23 日
this is the Simulink model
Walter Roberson
Walter Roberson 2023 年 9 月 23 日
It is not a coincidence that the output is length 1x5 and that 'Boost' has 5 characters.
Danikha Shyken
Danikha Shyken 2023 年 9 月 23 日
How do I correct it?
Walter Roberson
Walter Roberson 2023 年 9 月 23 日
I know very little about the syntax of Stateflow.
Is the intention for there to be an assignment, or is the intention for there to be a comparison?
If it is a comparison, perhaps == should be used?
If it is an assignment, then perhaps it should go inside the TEG state?
Perhaps you should be using "Boost" so that it is a string object instead of a character vector?
Perhaps you should be using some kind of enumeration or categorical instead of a character vector?
Danikha Shyken
Danikha Shyken 2023 年 9 月 25 日
I understand now, thanks much for your assistance.

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2023 年 9 月 23 日

0 投票

Simulink now supports "string" data type. At your Simulink model, press Ctrl+H to bring up the Model Explorer. Navigate to the chart, find the data "mode", specify its data type as "string". Use double quote to assign its value like {mode="boost";}

1 件のコメント

Danikha Shyken
Danikha Shyken 2023 年 9 月 25 日
I've got it, thanks for your help.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

質問済み:

2023 年 9 月 23 日

コメント済み:

2023 年 9 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by