What format is y in y=wavread('file')? Difficulty in finding peaks of a wav file as y is not a vector.
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I have been trying to find the peaks of a wav file but stuck with this error.
Error using findpeaks Expected X to be a vector.
Error in findpeaks>parse_inputs (line 54) validateattributes(X,{'numeric'},{'nonempty','real','vector'},...
Error in findpeaks (line 43) [X,Ph,Pd,Th,Np,Str,infIdx] = parse_inputs(X,varargin{:});
Error in ab (line 23) [pks,locs] = findpeaks(xn);
Error in run (line 57) evalin('caller', [s ';']);
I have used wavread as follows:
i = 88200; j = 352800; samples = [i, j]; [xn fs]=wavread('/media/file.wav',samples); t=[1/fs:1/fs:length(xn)/fs];
Please help.
Réponses (1)
Jos (10584)
le 14 Juil 2014
what does
size(xn)
returns? It might be N-by-2 for stereo wave files
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!