I encountered a similar issue when trying to use a saved model in MATLAB R2021a. I tried loading and saving the model again in MATLAB R2021a,and it fixed the error for me.
Please follow the steps given below to address the issue:
Load the model using MATLAB‘loadLearnerForCoder’function.
mdl = loadLearnerForCoder('CompactInBedSVM');
Save the model using MATLAB ‘saveLearnerForCoder’ function.
saveLearnerForCoder(mdl,'CompactInBedSVMNew');
For detailed information on these functions, please refer to the MATLAB documentation linked below.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.