for loop Matlab code in Simulink

3 次查看(过去 30 天)
Hi,
I was coding on Matlab by using for loop to get different values at each time. Now, I have to use the data in Simulink at each run time. Means, once run the Matlab code then some output from Matlab must be sent to the Simulink, Simulink will use the ouput to run the blockes. The next step time, the second value must be goot from the Matlab firsst then will be sent to the Simulink. So, at each time step Matlab and Simulink must have to work together. I would be so appreciated if someone can help me, it has been a week still couldn't solve it.
Matlab code have for loop, but I wanna use the for loop for the whole. But I wanna run the Matlab and Simulink simultneously.
  1 个评论
Goncalo Torres
Goncalo Torres 2022-10-4
What if you use a MATLAB function block in Simulink and implement your code there?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by