Merging multiple csv files into one mat file

6 vues (au cours des 30 derniers jours)
Ahmad Hasnain
Ahmad Hasnain le 18 Avr 2019
Réponse apportée : KSSV le 18 Avr 2019
I have multiple csv files (37 files). Every csv file has a column and it want to merge it into one mat file so that I get a mat file with 37 columns. How can I do that?

Réponse acceptée

KSSV
KSSV le 18 Avr 2019
csvfiles = dir('*.csv') ;
N = length(csvfiles) ;
A = cell(N,1) ;
for i = 1:N
A{i} = csvread(csvfiles(i).name)
end

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by