MATLAB: Do anyone know how to merge several (80-90) csv file data into 1 file

excel file merge

I have to merge data from several csv files into one csv file and find the maximum value of each column.
How shall I do it?

Best Answer

Assuming that all files have the same columns I'd do something like this:
  • where ncols is number of columns
  • preallocate max value variable: m = zeros(1, ncols);
  • loop over all files
  • read csv data using csvread into variable data
  • m = max(max(data), m);
  • end loop
m of course is your result.