how to plot graph from text data as shown in the image

10 vues (au cours des 30 derniers jours)
sanjiv kumar
sanjiv kumar le 6 Mar 2021

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 6 Mar 2021
Modifié(e) : KALYAN ACHARJYA le 6 Mar 2021
Try this way in MATLAB edit window
%Load the file
A=readmatrix('file.txt');
Get the x and y values
x=A(:,1);
x=A(:,2);
Plot the x and y data
plot(x,y);
Before plotting make sure the lengths of x and y are the same length, if not the same length, then check the data arrangement format within the text file.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Export 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