Easiest way to skip a few lines and then read data from this text file ( x and y) to draw a plot.
21 ビュー (過去 30 日間)
古いコメントを表示
I have attached the file I'm trying to do this for.
Thanks a lot!
0 件のコメント
採用された回答
Star Strider
2020 年 1 月 22 日
編集済み: Star Strider
2020 年 1 月 22 日
filename = '6in_nomass_5.txt';
Data = dlmread(filename, '\t', 6, 0);
There are others, such as readmatrix that are likely even easier, however you did not state the release you are using, so dlmread is a safe option.
EDIT — To draw the plot:
figure
plot(Data(:,1), Data(:,2))
grid
2 件のコメント
その他の回答 (1 件)
Jesus Sanchez
2020 年 1 月 22 日
From yout MATLAB: Home -> Variable -> Import data.
From there you can also create a function that will allow you to import future files.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!