필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to import and plot data from a series of similar text files

조회 수: 1 (최근 30일)
Md. Golam Mostafa
Md. Golam Mostafa 2015년 8월 20일
마감: MATLAB Answer Bot 2021년 8월 20일
I have about 500 text files each of them contains numeric data of same type. I could import the entire dataset from one file and plot the data of column 1 vs. data of column 7 by using the following script:
A=importdata('file1.txt');
ALT=A.data(:,1);
ED=A.data(:,7);
plot(ED,ALT);
Now I need to get separate plots of column 1 vs. column 7 of all the 500 files. How can I get it?
However, now I placed all the files in a directory and used the following script to read the file names:
filesFolder = 'nameoffolder/';
allTextFiles = dir([filesFolder,'*.txt']);
numberOfTextFiles = numel(allTextFiles);
nameOfTextFiles = {allTextFiles.name};
Now need to read those files one by one.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by