Using indexing to find specific rows
2 ビュー (過去 30 日間)
古いコメントを表示
I have a .CSV file that has the latitude, longitude, and elevation in three columns. I would like to bring that into my code, so if a certain longitude is typed in, then the latitude and elevation associated would be the out put. I am having problems with the import feature, and the numbers keep rounding up which is not good for what I am doing. Any help is greatly appreciated.
0 件のコメント
採用された回答
Star Strider
2020 年 2 月 14 日
There are a number of ways to read your file.
With respect to the rounding, that is only in the display. MATLAB maintains full internal precision.
With that in mind, however, the ismembertol funciton could be useful in retrieving the desired coordinates.
2 件のコメント
Star Strider
2020 年 2 月 14 日
Thank you!
Yes.
It returns a vector of logical elements. If you want specific numerical array indices, use find with it.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operators and Elementary Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!