- 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
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Bram Surewaard
le 13 Oct 2020
Réponse apportée : Prabhan Purwar
le 24 Oct 2020
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 commentaires
Réponse acceptée
Prabhan Purwar
le 24 Oct 2020
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Point Cloud Processing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!