lidarScan Error in Matlab function using Simulink

1 visualización (últimos 30 días)
Uriel Jost
Uriel Jost el 20 de Mzo. de 2018
Hello everybody,
I am using Matlab 2017b and try to use lidarScan in Simulink.
This is my Simulink Model
With its enabled Subsystem
Here you can see my simple Matlab function in Simulink
function lidarscan=fcn(u)
lidarscan=lidarScan(u);
This are the settings of the Matlab function
And this is the error I get
Expected cart to be one of these types: single, double. Instead its type was struct.
Function 'Enabled Subsystem/MATLAB Function1' (#23.41.56), line 3, column 12:
"lidarScan(scan)"
Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Errors occurred during parsing of MATLAB function 'Enabled Subsystem/MATLAB Function1'
Component:MATLAB Function | Category:Coder error
Simulink cannot determine sizes and/or types of the outputs for block 'Enabled Subsystem/MATLAB Function1' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
Component:MATLAB Function | Category:Coder error
Simulink cannot determine sizes and/or types of the outputs for block 'Enabled Subsystem/MATLAB Function1' due to errors in the block body, or limitations of the underlying analysis. The errors might be inaccurate. Fix the indicated errors, or explicitly specify sizes and/or types for all block outputs.
Component:Simulink | Category:Model error
Port width mismatch. Input 'scan' expects a signal of size 1. The signal received is of size [1x1].
Component:Simulink | Category:Model error
I don't understand why 'scan' is asked to be single or double? If I do the same just using Matlab, there is no error.
I hope you can help me.

Respuestas (0)

Categorías

Más información sobre Biotech and Pharmaceutical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by