Plotting data in mat lab based on a certain criteria
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
wissam abdallah
el 13 de Feb. de 2018
Comentada: wissam abdallah
el 15 de Feb. de 2018
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 comentarios
Bob Thompson
el 13 de Feb. de 2018
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.
Respuesta aceptada
Jeff Miller
el 13 de Feb. de 2018
If you convert your data into MATLAB's table format, PlotTbl may be useful (and save you a lot of nested for loops).
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!