Hello! I am trying to run the Basic Models function on CAT12 but every time I run the batch editor after specifying my model, I get the following error:
------------------------------------------------------------------------
15-Apr-2024 11:32:13 - Running job #1
------------------------------------------------------------------------
15-Apr-2024 11:32:13 - Running 'Basic models'
Mapping files : ...done
Design configuration : ...done
Saving SPM configuration : ...SPM.mat saved
Design reporting : 15-Apr-2024 11:32:22 - Failed 'Basic models'
Error using matlab.graphics.axis.Axes/set
Invalid or deleted object.
In file "/Users/arjunthanaraju/Downloads/PhD/spm12/spm_DesRep.m" (v6070), function "spm_DesRep" at line 734.
In file "/Users/arjunthanaraju/Downloads/PhD/spm12/config/spm_run_factorial_design.m" (v7739), function "spm_run_factorial_design" at line 1073.
In file "/Users/arjunthanaraju/Downloads/PhD/spm12/toolbox/cat12/cat_conf_factorial.m" (???), function "cat_run_factorial_design" at line 1440.
The following modules did not run:
Failed: Basic models
Could someone help me overcome this error, please? Thanks!

 採用された回答

Kautuk Raj
Kautuk Raj 2024 年 4 月 26 日

0 投票

I can gather that you are facing an "Invalid or deleted object" error in CAT12 when running Basic Models, which is linked to how MATLAB handles axes with the hold on command.
This issue arises because hold on affects the current, most recently used axes, and if the script tries to modify an axis that has been replaced or deleted, you get this error.
To fix this, replace hold on with hold(axisHandle), specifying the exact axes to hold. This ensures you are working with the correct axes and avoids the error. You might need to locate where hold on is used in the code and make this adjustment.
For more details on managing axes and the hold function, refer to the MATLAB documentation: https://www.mathworks.com/help/matlab/ref/hold.html
I hope this answer provides a clear direction to resolve the error.

5 件のコメント

Arjun
Arjun 2024 年 4 月 29 日
Thank you! Will try this and hope it works.
minjee
minjee 2024 年 4 月 30 日
Has this issue been resolved by any chance? I'm struggling with the same issue and would like to know the solution.
Arjun
Arjun 2024 年 4 月 30 日
I downgraded to MATLAB version 2018b (as suggested by another user) and it seemed to have resolved it. Not sure if this is the best solution but it worked for me.
Pari
Pari 2024 年 6 月 10 日
Any luck solving this by changing to hold(axisHandle)? What values did you specify?
Breona
Breona 2024 年 7 月 25 日
Did anyone figure this out! I am struggling with the same issue. i downgraded Matlab and it still doesnt work

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

リリース

R2023b

タグ

質問済み:

2024 年 4 月 15 日

編集済み:

2024 年 7 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by