how to plot graph from text data as shown in the image
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
KALYAN ACHARJYA
2021-3-6
编辑:KALYAN ACHARJYA
2021-3-6
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.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!