Plotting data in mat lab based on a certain criteria
2 ビュー (過去 30 日間)
古いコメントを表示
hi i am new in mat Lab i have set of data that are constitute of station, year, month, day and Temperature i want to plot the temperature values per month in each year according to a specific station any one can help me to make this process will be appreciate best regards.
11 件のコメント
Bob Thompson
2018 年 2 月 13 日
Essentially, the data structure I suggested was a series of cells and subcells to contain the necessary information. It would make indexing a pain, but it would be less challenging than large arrays.
In response to (1), the different years for the stations could be covered with an if statement. This method will never be pretty, and I'm sure there are functions to make them easier, but I don't know them.
For (2), no, I did not include station number, but it would simply be another layer of for loops.
You can put all of the information into a single array, but there isn't much difference from a 59000x1 array and a 59000x7 array, especially since you're really only looking at one of those columns. So, the method will work, but its impact will be minimal.
採用された回答
Jeff Miller
2018 年 2 月 13 日
If you convert your data into MATLAB's table format, PlotTbl may be useful (and save you a lot of nested for loops).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!