I want to stop my simulink code after 10 seconds of running
7 ビュー (過去 30 日間)
表示 古いコメント
I am using simulink audio tool box to record an audio.
I am starting this simulink code using my matlab code.(sim("*simulink file name*")).
But i want this simulink file to run for 15 seconds so the .wav file output from the simulink code can be read by the matlab code.
0 件のコメント
回答 (2 件)
Jon
2022 年 6 月 30 日
So I'm assuming you mean that you want the Simulink model to run for 15 seconds of real time. Otherwise if you just want it to run for 15 seconds of simulated elapsed time you could just set you stop time to 15 seconds.
To make it run for 15 seconds of real time you can use the Simulation Pacing Option. To get to this setting click on the drop down below the Run button. There you can check the box for "Enable pacing to slow down simulation, and set the slider for Simulation timer per wall clock second to 1. With those settings, if you set the stop time of the simulation to 15 seconds, the real elapsed time will also be 15 seconds.
4 件のコメント
Walter Roberson
2022 年 6 月 30 日
audiorecorder() is useful for capturing a specific amount of audio data.
参考
カテゴリ
Find more on Audio Plugin Creation and Hosting in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!