HOW TO MERGE CSV FILE?

조회 수: 3 (최근 30일)
Arijeet Sinha
Arijeet Sinha 2018년 9월 26일
편집: Walter Roberson 2018년 9월 26일
I want to merge csv files with same name but in different subfolder and plot them for my choice of column.
I write this code till now:
addpath(genpath('C:/Users/Arijeet/Downloads/folder_name'));
[v,T,vT]=csvread('*.csv');
t=v(:,1);y=v(:,2);
plot(t,y);
It has 207 columns.
This code read all file but plot only the last one.
  댓글 수: 1
Stephen23
Stephen23 2018년 9월 26일
Where in the csvread help does it mention this syntax with an asterisk?:
csvread('*.csv')
Reading the documentation is much more efficient than guessing how MATLAB works.

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2018년 9월 26일
Run a loop for each file.....and use hold on for plotting.

카테고리

Help CenterFile Exchange에서 Big Data Processing에 대해 자세히 알아보기

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by