Unable to read mat-file reinforcement learning agents

1 view (last 30 days)
I have saved agents using the SaveAgentDirectory in the rlTrainingOptions. When I try to load the agent files, I get the following error:
Error using load
Unable to read MAT-file C:\filepath\Agent1.mat. File might be corrupt.
This happens regardless of whether I try to open the file in the GUI or through e.g. the following code:
listing = dir("C:\filepath\*.mat");
for ct = 1:numel(listing)
load(sprintf("C:\\filepath\\%s",listing(ct).name));
% do something
end
I have attached one of the saved agent files for reference.
  1 Comment
Walter Roberson
Walter Roberson on 13 Jul 2020
The MATCAT file analysis tool in the File Exchange says that the second variable is corrupt.
Note though that MATCAT was developed for an older MATLAB and might not be able to analyze all variables... but one variable is all that the regular MATLAB tools are able to successfully find in it.

Sign in to comment.

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!