配列インデックスのエラーメッセージについて
显示 更早的评论
下記のようなプログラムで、エラーメッセージが出ます。どのように直せば良いですか。
if ~isnan(t_TRGe_V(1))==1
for t = 2:length(t_TRGe_V)-1
pFp1_V = [pFp1_V;Fp1_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pFp2_V = [pFp2_V;Fp2_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pFC3_V = [pFC3_V;FC3_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pFC4_V = [pFC4_V;FC4_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pO1_V = [pO1_V;O1_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pO2_V = [pO2_V;O2_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pP5_V = [pP5_V;P5_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
pP6_V = [pP6_V;P6_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
end
配列インデックスは正の整数または logical 値でなければなりません。
エラー: EEG_test (行 82)
pFp1_V = [pFp1_V;Fp1_V(t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2))'];
采纳的回答
更多回答(1 个)
Hernia Baby
2022-9-30
t_TRGe_V(t)+analwin_eeg_V(1):t_TRGe_V(t)+analwin_eeg_V(2)
上記が正の整数でないことが問題です。
Fp1_V の 0.001番目 と言われてエラーが起きてる感じです。
类别
在 帮助中心 和 File Exchange 中查找有关 EEG/MEG/ECoG 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!