Hi all!
I have 200 files with name day_0012014 until day_2002014. Each file has 3 columns. I want to plot first and third columns. What can i do?
Thanks...

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 10일
편집: Azzi Abdelmalek 2015년 7월 10일

0 개 추천

You didn't specify the type of files (text file or Excell or ...). Suppose they are text files
for k=1:200
FileName=sprintf('day_%03g2014.txt',k)
data{k}=dlmread(Filename)
end
Now you can access to each matrix
figure
hold on
for k=1:numel(data)
c1=data{k}(:,1)
c3=data{k}(:,3)
plot(c1,c3)
end
hold off

댓글 수: 1

Thar
Thar 2015년 7월 11일
my files are txt.
all these files are in my desktop in a file with name measurments.
I wrote the path in the filename like
FileName=sprintf('C:\......Desctop\measurments\day_%03g2014.txt',k)
but it has wrong:
Undefined function or variable 'Filename'.
Thank you

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

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

2015년 7월 10일

댓글:

2015년 7월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by