How to close neural network training dialog in 2022a

13 views (last 30 days)
Hello everyone,
in 2022a the nntraintool command has been removed
Citation:
R2022a: nntraintool has been removed
Errors starting in R2022a
nntraintool has been removed. To train a network and open the training window, use train instead.
The documentation only mentions that opening it is now done via the "train" command. It does however not mention how to replace
nntraintool('close')
in 2022a.
Can anyone point me to some code on how to programmatically close the traintool after training? Or is this function simply lost?
Thanks in advance.

Accepted Answer

Abhijit Bhattacharjee
Abhijit Bhattacharjee on 19 May 2022
Referring to this question, this can be done using the following command:
delete(findall(0))
This is because the ‘HandleVisibility’ is set to ‘off’ for these plots by default.
  2 Comments
Sven Merk
Sven Merk on 19 May 2022
This is what I came up with, thanks to your answer:
function close_traintool()
matlab_version = regexp(version("-release"), "(\d{4,4})(a|b)", "tokens", "once");
if str2double(matlab_version{1}) >= 2022
delete(findall(0));
else
nntraintool('close');
end
end

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by