Mapping Test Harness Inputs to an Excel .xlsx File
Mostrar comentarios más antiguos
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?
1 comentario
Swarooph
el 23 de Jun. de 2017
From the looks of it, it seems that boolean may not be supported. In fact I tried with the linked example and nothing but double works. So I think you are better of creating a harness model ( Analysis > Harness > Create From Model) from your main model and add data conversion blocks . So the harness model will have double input port --> Data Conversion from double to boolean --> Main model boolean input port. Shown in the picture below:

Then using the harness you can map it now. Screenshot below:

Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Inputs en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!