위치 2의 인덱스가 배열 경계를 초과합니다. 어떻게 해결하나요?
이전 댓글 표시
% Get info of recording dates
RecDates = readtextfile('Rec_dates.txt');
line1 = deblank(RecDates(1,:));
SurgeryDate = line1(9:end)
%SurgeryDate = input('Type the surgery date (e.g. 20220311)','s');
SurgeryDate2 = [SurgeryDate,'-000000-000'];
SurgeryDate3 = datenum(SurgeryDate2,'yyyymmdd-HHMMSS-FFF');
a=size(RecDates);
nRec = a(1)-1;
for n=1:nRec
line = deblank(RecDates(n+1,:));
Rec(n) = line(end);
end
% Get average amplitude and entropy envelopes of the 10+ model songs
Models = ls('ModelSongs4xcorr/*.wav');
clear Ampl Entr
for n=1:length(Models(:,1))
SoundFile = ['ModelSongs4xcorr/',deblank(Models(n,:))];
[Sound, Fs]=audioread(SoundFile);
if length(Sound(1,:))>1
Sound = Sound(:,1);
end
[SAPFeatures] = GetSAPFeatures(Sound,Fs);
Ampl{n} = SAPFeatures.Amplitude;
Entr{n} = SAPFeatures.Entropy;
end
위치 2의 인덱스가 배열 경계를 초과합니다.
오류 발생: SingRate_SongSort2_NHpC (line 22)
for n=1:length(Models(:,1))
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 진동 해석에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!