I am trying to post-process matrix of frames I get from a camera. Each frame is outputted as a.mat file with a "Frame" variable that is a 512x640 double. I want to import all of these files for each frame, I have 2497 frames so 2497 files, and create a 3D matrix that is 512x640x2497 with all the frames. I currently import the frames but it creates a 1x2497 strucutre with each field being a 512x640 double. Is it possible to convert this structure to a 3D matrix or import the data straight into a 3D matrix?
This is my code so far:
filename = sprintf('Rec--000013_%d.mat', k);
all_frames(k+1) = load(filename,'Frame');
fprintf('File %s does not exist.\n', filename);
fprintf('Now Reading File : Rec--000013_%d.mat\n', k)