Info

This question is closed. Reopen it to edit or answer.

Problems with my Macro

1 view (last 30 days)
Bran
Bran on 17 Feb 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I am trying to run a function that I have written in MATLAB automatically for twenty five text files that I have. I am using the following code;
function SINANALYSIS(in,out,out2,out3)
x = load(in);
y = SOME ANALYSIS ON SIN FUNCTION
y2 = FURTHER ANALSYSIS on SIN FUNCTION
y3 = PART3 ANALYSIS
save(out,'y')
save(out2,'y2')
save(out3,'y3')
file 2: "process_it_all"
in = {'file1.txt','file2.txt' 'file.txt'...'file25.txt'};
out = {'VAR1'};
out2={'VAR2'};
out3 = {'VAR3'};
for i = 1:numel(in)
SINANALYSIS(in{i},out{i},out2{i}, out3{i})
end
However, I am getting many errors using this code. Is there another way about automating this process?

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!