MATLAB: Mutiple reshaping files and the output have similar name of the input files

multiple filesoutput nameoutput name match input namereshaping

i am loading more than 60 ASCII files. i want to reshape them but i want the output files from the reashing match the input files names or at least the number name in the files.
files name fv895,fv898,fv995……………
clear
files = dir('fv*.asc');
for i=1:length(files)
eval(['load ' files(i).name ' -ascii']);
sd=reshape(files(i).name,1,[]);
end

Best Answer

I'm not aware of you file contents (or even whehter you can use load to read them). Regardless, you may need something like:
files = dir('fv*.asc');
mydata = cell(numel(files), 1);
for i = 1:numel(files)
mydata{i} = load(files(i).name); % still don't know if you need readtable, readcell, fread, etc instead of load
mydata{i} = reshape(mydata{i}, 1, []);
end
Related Question