Error in first-level analysis using SPM12, seeking assistance.

4 ビュー (過去 30 日間)
john
john 2023 年 8 月 8 日
コメント済み: john 2023 年 8 月 8 日
The analysis has been successful for data from other groups, but this issue is occurring specifically with this group.
Index exceeds the number of array elements. Index cannot exceed 0.
In file "D:\Matlab\toolbox\spm12\config\spm_run_fmri_spec.m" (v7739), function "spm_run_fmri_spec" at line 136.
The following modules did not run:
Failed: fMRI model specification
The code that caused the error is
“if ~isempty(sess.multi{1})“

回答 (1 件)

Florian Bidaud
Florian Bidaud 2023 年 8 月 8 日
編集済み: Florian Bidaud 2023 年 8 月 8 日
This means sess.multi is an empty cell array, therefore you can't call sess.multi{1} because it does not exist.
You should add something like the following, before checking if sess.multi{1} is empty.
if ~isempty(sess.multi)
  3 件のコメント
Florian Bidaud
Florian Bidaud 2023 年 8 月 8 日
編集済み: Florian Bidaud 2023 年 8 月 8 日
Without knowing how the data is, I'm afraid I can't explain why there is an empty element. But the error you got tells you that you have indeed an empty element in your data.
I wouldn't advise modifying the spm code, but maybe have a look on your data instead, to identify why you get these empty cells
john
john 2023 年 8 月 8 日
Okay, thank you, I'll check the data for errors

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNeuroimaging についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by