Run a calculation on multiple different .csv files and export the result
Hello all!
I am new to MATLAB but I am working on performing matrix calculations. I have the calculation code nailed down. The problem is I have 500+ .csv files that I have to read in, perform the calculation, and export each separately.
Is there a way to read in a folder of .csv files, perform my calculation on each, and then export the result of each 500+ calculations to one place?
%so this grabs one single .csv file and performs my calculation%
>> filename=’THESISv1-DATA.csv’;
M=csvread(filename);
>> S = sum(abs(M(2:end,:)-M(1:end-1,:)),1)Hello all!
I am new to MATLAB but I am working on performing matrix calculations. I have the calculation code nailed down. The problem is I have 500+ .csv files that I have to read in, perform the calculation, and export each separately.
Is there a way to read in a folder of .csv files, perform my calculation on each, and then export the result of each 500+ calculations to one place?
%so this grabs one single .csv file and performs my calculation%
>> filename=’THESISv1-DATA.csv’;
M=csvread(filename);
>> S = sum(abs(M(2:end,:)-M(1:end-1,:)),1) Hello all!
I am new to MATLAB but I am working on performing matrix calculations. I have the calculation code nailed down. The problem is I have 500+ .csv files that I have to read in, perform the calculation, and export each separately.
Is there a way to read in a folder of .csv files, perform my calculation on each, and then export the result of each 500+ calculations to one place?
%so this grabs one single .csv file and performs my calculation%
>> filename=’THESISv1-DATA.csv’;
M=csvread(filename);
>> S = sum(abs(M(2:end,:)-M(1:end-1,:)),1) .csv, export results, multiple calculations, matrices MATLAB Answers — New Questions