Displaying Data From a MATLAB Function
Ältere Kommentare anzeigen
I have a MATLAB Function embedded in a simulation that is called cyclically. I would like to display information from that function as the simulation runs. I tried both disp() and fprint() but the information does not appear in the Command Window as the simulation runs. I verified that it hits the display lines by using a debug break. disp() lines that are placed in various .m files that initialize and start the simulation all appear as expected in the Command Window, just not those that are in the cycling MATLAB Function.
2 Kommentare
Albert Fan
am 18 Jul. 2018
I think the issue might be the stdout is dropped or flushed to somewhere else since it is called in a simulation. While I don't have much idea over that, you can simply save what shall be printed in your fprintf() function into a txt file locally and check that file you wrote after you've finished your simulation.
Tom
am 19 Jul. 2018
Antworten (0)
Kategorien
Mehr zu Code Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!