Matrix: Find corresponding elements in a different column
古いコメントを表示
I'm attempting to analyze a file with four columns of data, and each column has an equivalent number of rows. I need to split up these four large columns into smaller arrays. How could I find the elements in column 'B' which correspond to elements in column 'A'?
For instance, column 1 lists temperature and column 2 lists the pressure which corresponds to that temperature. Let's say the temperature column ranges from 0 to 100. I've split this large temperature column into smaller columns, such that column 1 lists temperatures 1-10, column 2 lists temperatures 11-20, etc. How can I create arrays which list pressure up to the point where the temperature array cuts off?
This seems trivial for small data sets, but mine have a little over 8,000 rows. I've thought of creating a large matrix with the four columns, but I don't know how to define array in which, for example, the pressure element (xxx, 2) corresponds to the temperature element (xxx, 1). Any help would be greatly appreciated. Thank you!
3 件のコメント
How did you order temperatures and how did you cut the large vector into smaller ones? Did you operate in a similar fashion on other columns of your large array? Finally, can you still access the original, large array, or was it lost?
I don't fully understand what you did at this point, but I can foresee a solution where you use temperatures for sorting all rows first, and then you segment all data in the same fashion (according to boundaries set on temperatures) ..
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
