Plotting numeric data vs time (from text file)

Hi, I am trying to import some numeric data from a text file and then plot it in MATLAB. There are two text files where the first file has two columns of measured data, 126 rows each, separated by a comma and the other file contains time which should be the x axis (one column and 126 rows). So two columns from the first file should be the y axis plotted against time in the second file. I don't have any code tho.
Please help :)

 채택된 답변

Stephen23
Stephen23 2021년 9월 11일
편집: Stephen23 2021년 9월 11일
"I am trying to import some numeric data from a text file and then plot it in MATLAB."
T = readmatrix('time.txt');
M = readmatrix('measured_data.txt');
plot(T,M)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import and Export에 대해 자세히 알아보기

질문:

2021년 9월 11일

댓글:

2021년 9월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by