위치 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!