Select specific data from txt file

1 view (last 30 days)
PRABOWO GALIH MAHANENDRA
PRABOWO GALIH MAHANENDRA on 24 Jun 2019
Answered: dpb on 25 Jun 2019
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

Answers (1)

dpb
dpb on 25 Jun 2019
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?

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!