How do I control my computer's audio volume from the MATLAB command prompt?

R
rehan_sefi · Mar 20, 2024 · 2K views
Question
I want to adjust the audio volume of my computer using MATLAB.
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 24, 2026
The ability to directly control your computer's audio volume is not available in MATLAB.
 
To work around this issue you can use the SYSTEM function in MATLAB to issue commands to another program that can control audio volume. Users on Windows systems can also use the DOS function.
 
For more information on the SYSTEM or DOS functions, type:
 
 
doc system

doc dos

at the MATLAB command prompt.

Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!