Plotting .txt files for a defined range
显示 更早的评论
Hi, I am using the following code to plot y vs x from a .txt file. The .txt file has only 2 columns in it. However, my range of x data are from 200 to 1000 and I only want to plot from 400 to 700 for the x axis and have their associate y values. How can I implement this in my code?
fid=fopen('1GPL.txt');
s=textscan(fid,'%d %d %d','headerlines',23);
fclose(fid);
x=s{1};
y=s{2};
plot(x,y)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!