Plotting numeric data vs time (from text file)

9 vues (au cours des 30 derniers jours)
Lovre Petrovic
Lovre Petrovic le 11 Sep 2021
Commenté : Lovre Petrovic le 11 Sep 2021
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 :)

Réponse acceptée

Stephen23
Stephen23 le 11 Sep 2021
Modifié(e) : Stephen23 le 11 Sep 2021
"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 commentaire
Lovre Petrovic
Lovre Petrovic le 11 Sep 2021
Thank you sir, that's what I needed :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polar Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by