- https://www.mathworks.com/help/simulink/slref/matlabfunction.html#f7-2761585_blockchar (MATLAB Function)
- https://www.mathworks.com/help/simulink/ug/comparison-of-custom-block-functionality.html (Comparison of custom block functionality)
Use Matlab function inside Simulink MATLAB function
7 次查看(过去 30 天)
显示 更早的评论
Hey,
I want to edit the point cloud data that the Simulation 3D Lidar block generates.
The data that is outputs I first need to convert into a pointcloud, similar is done with the helperGetPointCloud function that is used in multiple examples of working with the Simulation 3D Lidar block.
This function shows that it first creates a pointcloud from the data, so that is what i wanted to do first.
However when i tried that with this small function block in simulink:
function MultibeamPointCloud = Multibeamdata(PointClouddata)
MultibeamPointCloud = pointCloud(PointClouddata);
end
It will not work and i get the following error message:
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Component:MATLAB Function | Category:Coder error
A top-level output parameter containing a class is not supported in MATLAB Function Block. Output parameter 'MultibeamPointCloud' contains a class. Function 'Subsystem/Create Multibeam data' (#264.9.28), line 1, column 10: "MultibeamPointCloud" Launch diagnostic report.
Component:MATLAB Function | Category:Coder error
Errors occurred during parsing of MATLAB function 'OwnSimulation/Subsystem/Create Multibeam data'
Component:MATLAB Function | Category:Coder error
Simulink cannot determine sizes and/or types of the outputs for block 'OwnSimulation/Subsystem/Create Multibeam data' 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
I dont understand what this error means and how i can fix it, can anybody help me with this problem?
0 个评论
采纳的回答
Prabhan Purwar
2020-10-24
Hi,
MATLAB Function block only support output such as scalar, vector and matrix. Output generated from pointCloud is a pointCloud object which requires class to handel in simulink.
Following example illustrates the pointCloud object support in Simulink:
For further insights kindly refer to the following links:
Thanks
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!