Select specific data from txt file
显示 更早的评论
I have the following data in txt file. Let's say I found my aoa from the formula 40, so then I want to read from the txt file if i have value 40 or not for aoa, if i have i will take the next side value, which is 0.974 from cl and 0.854 from cd, how can i do that?
aoa cl cd
40 0.974 0.854
39 0.965 0.84
38 0.954 0.826
37 0.941 0.812
36 0.927 0.792
35 0.915 0.759
34 0.905 0.721
33 0.894 0.669
32 0.885 0.603
31 0.879 0.558
30 0.873 0.507
29 0.876 0.48
回答(1 个)
dpb
2019-6-25
0 个投票
Just read the file into memory and do a find() -- since it's an integer that'll be exact.
What do you do if there isn't a match?
类别
在 帮助中心 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!