How to bypass 'Data type mismatch' error

22 ビュー (過去 30 日間)
Henry
Henry 2013 年 5 月 3 日
回答済み: Bhupal Reddy Perugu 2016 年 4 月 20 日
Hello,
In the model, I usaully 'OR' block to connect a constant, which is double (0) with a logical input. It works before until 2013a. It gives me an error like this:
"Data type mismatch. Input port 2 of '...' expects a signal of data type 'boolean'. However, it is driven by a signal of data type 'double'." on 'OR' blocks.
I don't want to change the constant (they are everywhere in my model!). Is there a way to bypass this check?
Thanks!
  1 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 5 月 3 日
Do you have the "Require all inputs and the output to have the same data type" checkbox selected in the 'Data Type' pane of the OR block's dialog?

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

回答 (1 件)

Bhupal Reddy Perugu
Bhupal Reddy Perugu 2016 年 4 月 20 日
1) Use Data Type Conversion Blocks at root level inports,and 2) uncheck configuration parameters--> optimization-->Implement logic signals as Boolean data.

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by