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!