lidarScan Error in Matlab function using Simulink
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Biotech and Pharmaceutical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!