Send real-time data from .m script to simulink
조회 수: 16 (최근 30일)
이전 댓글 표시
Hi,
So I am trying to do an image processing (live from a webcam) in a .m file in MATLAB. from this file, I would like to send a real-time data (float) to simulink. How do I do this?
댓글 수: 0
답변 (1개)
Taru
2022년 11월 25일
Hello Nathanael,
I gather that you want to perform image processing on the live input and then import the output floating point data saved in MATLAB into Simulink.
As you have the image processing scripts in the MATLAB script with extension ‘.m’, and after executing the file, the output is stored in workspace variables. To get the workspace variable values onto Simulink, you must save them into ‘. mat’ file.
Simulink offers ‘From file’ block to perform this operation of importing ‘. mat’ file into Simulink. See this documentation for help.
Hope it resolves your query.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!