Hello,
Here's my issue. I have a folder containing 2435 files of the type '.aqa' (from an acoustic backscatter sensor). I have a function called ReadAquaScat1000.m which converts these files to .mat, which I can then work with further. I do not want to manually run the function 2435 times to convert these files, and so have tried writing a for loop. However, I am not sure how to do this because the function input must be the filename in single quotes, not including the .aqa extension, and I'm not sure how to assign a different filename with each loop iteration. My code is below. Thank you for any help you can provide!
%converts raw ABS .aqa files into .mat files that can be organized
%using ABSall.m
%first, navigate to directory containing .aqa files
filenames=dir('*.aqa');filenames=struct2cell(filenames);filenames=char(filenames(1,:)); %character array of filenames
filenames2=char(zeros(2435,14)); %preallocate array for filenames w/o .aqa extension
numbursts=length(filenames);for i = 1:numbursts; %for each burst
[~,filenames2(i,:),~]=fileparts(filenames(i,:)); %create array of filenames w/o .aqa extension
file = char(filenames2(i,:)); %single filename, to be function input
ReadAquaScat1000('file','SINGLE') %convert file
end
Best Answer