how can I run in real time my matlab code?

6 visualizzazioni (ultimi 30 giorni)
Zakaria Makhlouki
Zakaria Makhlouki il 3 Feb 2017
Risposto: Walter Roberson il 4 Feb 2017
I'm implementing the active noise control algorithm, but how can I run it effectively in real time? the other question is: there is a way to convert my final code to ".exe" extension? thank you very much.

Risposte (1)

Walter Roberson
Walter Roberson il 4 Feb 2017
.exe extension will not run in real-time. .exe implies a file that calls upon the MS Windows operating system, which is not a real-time operating system; see https://www.osr.com/nt-insider/2014-issue3/windows-real-time/
To go real-time in MS Windows you need to create kernel-mode driver code and assign it the Real-Time Priority; https://www.researchgate.net/post/What_is_the_purpose_of_having_a_Real-Time_process_priority_in_MS_Windows. MATLAB and associated toolboxes are not designed for creating such drivers.
Mathworks offers Simulink Desktop Real-Time (for hosted systems) and <https://www.mathworks.com/products/simulink-real-time.html Simulink Real Time (for stand-alone).
If you wish to do the programming in MATLAB you should probably use the DSP Toolbox, or possibly the Audio System Toolbox (new in R2016b). Working in Simulink is easier to generate embedded and real-time models.

Categorie

Scopri di più su Install Products in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by