Using Simulink from .m file
이전 댓글 표시
I have my whole code written in a gigantic .m file. In a certain process I am doing in my code, I want to call this block (shown in picture) and give it "F" and "Ma" and take its outputs back from simulink to my code's workspace. I am struggling to do this correctly and the sim command page is poorly written to help me with this. Any help is appreciated.

댓글 수: 6
Paul
2023년 1월 16일
Hi Ali,
Are the blocks for F and Ma both Constant blocks? If so, what is their respective "Constant value" fields? If not, what are those blocks?
Ali Almakhmari
2023년 1월 16일
편집: Ali Almakhmari
2023년 1월 16일
Paul
2023년 1월 16일
Yes, I understand what your're doing (I assume you have a good reason for doing step 3 in the .m file instead of in the simulation itself). To help you solve the problem, I'd need to know:
Are the blocks for F and Ma both Constant blocks? If so, what is their respective "Constant value" fields? If not, what are those blocks?
Ali Almakhmari
2023년 1월 16일
I'm not asking about the values, I'm asking about the blocks themselves. Can you double click on each block and post a screenshot of the block parameters window that pops up for each? Image files can be uploaded using either the paperclip icon or the image icon (to the left of link icon) in the Insert menu.
Ali Almakhmari
2023년 1월 17일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
