- Ensure that your "cameraParameters" object is available in the MATLAB workspace.
- Open your Simulink model and add a MATLAB Function block. Double-click the block to open the editor. Define the function to output the required parts of the "cameraParameters".
- Configure the Output Ports of the MATLAB Function block correspond to the outputs of your function (e.g., "focalLength", "principalPoint", "imageSize").
- Connect the outputs of the MATLAB Function block to the rest of your Simulink model as needed.
- When you run your Simulink model, the MATLAB Function block will fetch the "cameraParameters" from the MATLAB workspace and output the necessary parts.
You can look into this link for more info on Function Blocks: https://www.mathworks.com/help/simulink/ug/what-is-a-matlab-function-block.html