how to read multiple excel files, apply hampel filter and save them into folder with same names as input files

2 views (last 30 days)
Hi everyone
I have 20 excel files in a folder, I want to read those files, apply hampel filter and save them into a folder with same names.
for i=1:n
data=xlsread(fullfile(files(i).folder, files(i).name));
I am not getting how to apply filter and save the files. Here is attachement of error.
Bob Thompson
Bob Thompson on 17 Jul 2019
Making a file name within a loop is usually accomplished by concatonating a string. I will provide an example, but you will have to change it to come up with your specific desired output.
y = [files(i).folder,'\output_',num2str(i),'.csv'];

Sign in to comment.

Answers (1)

Mario Chiappelli
Mario Chiappelli on 18 Jul 2019
This task would be a lot easier to accomplish in Visual Basic (VBA).

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!