In order to avoid re-training your model again and again, consider saving it in the form of a 'mat' file by using the 'save' function and using it again by loading the 'mat' file using 'load' function.
Here is an example:
% Considering 'trainedModel' to be the model you are training
save('myTrainedModel.mat', 'trainedModel');
% Later or in a new session, load the model
loadedData = load('myTrainedModel.mat');
trainedModel = loadedData.trainedModel;
Also consider referring to the following MATLAB Answers and their approaches:
The following MathWorks documentations can be referred:
Thanks.
