MATLAB: Mapping Test Harness Inputs to an Excel .xlsx File

boolean inputimport from excelmapping inputsMATLABsimulinksimulink testtest manager

The mathworks documentation( Importing Microsoft® Excel® Data ) shows how to map a .xlsx file to input ports in a test harness. This works fine if the input ports are doubles. However, if the input ports are boolean, the signal fails to map with the error: "Not compatible for simulation." I have tried using 0, 1 and TRUE, FALSE in the excel spreadsheet, but it still will not map. Is there a format for importing boolean data, or is this not supported?

Best Answer

Hi Trevor,
I understand from your description that you tried to map excel input data into boolean input port. The only data type supported in R2017a is double. Boolean type will be supported in R2017b, which will be released in September this year. But you can download a Prerelease trial from the following link to try this new feature:
A workaround for this is what Swarooph suggested in the comment section. You can try 'Data Type Conversion' block to suite your need.