Interfacing Simulink with another program through text files

I simply want Simulink to write an output signal to a text file, wait for the values of a second text file to get updated by another program, which are then read as the input for Simulink to continue the signal. Basically interupting the simulation during the timestep in order to output and input the signal from a text file from another program.
I tried with the Matlab function block. However, the fprintf function cannot write a changing variable to a text file, only a constant one. Not sure exactly why.
Does anyone know how to do this or know of a workaround?
Thanks in advance for answers :)

답변 (0개)

카테고리

질문:

2019년 11월 12일

편집:

2019년 11월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by