Hello all, I am working with some code where I am tasked with recreating a new imageDatastore in order to retrain a neural network. The entire code is in a for loop and I am having trouble saving a reproduced image to a datastore without it getting overwritten every iteration. I need to save Irec into a datastore so that I can then move to retraning the neural network however I am at a bit of a loss regarding how to do this.
Irec = max(0,Irec);
Irecmax = max(max(Irec));
Irec = 255*Irec/Irecmax;
title(['Reconstructed with ' num2str(pview) ' views in [0, ' num2str(thetamax) ']']);
dr = classify(netTransfer,Irec);
xlabel(['Classified as: ' char(dr)]);
title(['Reconstruction: Plot of row ' num2str(plotrow)])