I want the input stored into name be displayed in the %s. How can I do it? it is possible? name = input ('Enter the name of the voice command'); file = sprintf('%s.wav','name'); %name the sound file to be created
John Michell answered .
2025-11-20
% Ask user for the name of the file to be created.
[baseFileName, folder] = uiputfile('*.wav', 'Enter the file name of the voice command to be created')
% Create the full file name with the folder prepended.
% .wav will be automatically appended regardless
% if they did or did not enter an extension.
fullFileName = fullfile(folder, baseFileName)