MATLAB: Error using audiowrite function in 2016b: Expected a string scalar or character vector for the parameter name, instead the input type was ‘double’.

audiowriteerror

the error:
Error using audiowrite
Expected a string scalar or character vector for the parameter name, instead the input
type was 'double'.
Error in audiowrite>parseInputs (line 226)
parse(p,filename, y, Fs, pvpairs{:});
Error in audiowrite (line 103)
props = parseInputs(filename, y, Fs, varargin);
Error in matchLTAS (line 24)
audiowrite(['LTASNORM_' wavenames{i}],output{i},fs,16);%write new wave file

Best Answer

audiowrite(['LTASNORM_' wavenames{i}], output{i}, fs, 'BitsPerSample', 16);