Plotting numeric data vs time (from text file)

2 ビュー (過去 30 日間)
Lovre Petrovic
Lovre Petrovic 2021 年 9 月 11 日
コメント済み: Lovre Petrovic 2021 年 9 月 11 日
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 :)

採用された回答

Stephen
Stephen 2021 年 9 月 11 日
編集済み: Stephen 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)
  1 件のコメント
Lovre Petrovic
Lovre Petrovic 2021 年 9 月 11 日
Thank you sir, that's what I needed :)

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by