Plotting data in mat lab based on a certain criteria

2 Ansichten (letzte 30 Tage)
wissam abdallah
wissam abdallah am 13 Feb. 2018
Kommentiert: wissam abdallah am 15 Feb. 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 Kommentare
wissam abdallah
wissam abdallah am 13 Feb. 2018
hi Mr first i would like to express all my respects for your follow . about the link you have sent i checked it but the page seems to be not available anymore.
about the algorithm you have sent, i think it is difficult to apply it for many reasons: 1. the data that i have exported form the data base and imported to matlab include many stations(7 stations) which are different each other form the period of data collecting for example for stations: beirut available data period spreed form 1963 to 2016 tripoli available data period spreed form 1963 to 2016 Zahleh available data period spreed form 1963 to 2016 Arz available data period spreed form 1950 to 1963 marjeeyoun available data period spreed form 1950 to 1963
2. the algorithm you have sent is missing for the station Code, because i want to plot data also according to a specific ST_CODE such as beirut, tripoli ...
maybe starting form the Arrays that are generated form matlab while i am importing the data ,if i can reconstruct my data by integrating all these arrays into one array that include them overall in the same order that have been in my table excel , such that i can write algorithm to the integrated array in order to plot data based on all my criteria s. do you agree with me about this solution if yes, are there in matlab algorithms(procedure r functions ... ) that satisfied my requirements in this mission? thank you a lot Mr .. and i appreciate again your support Regards
Bob Thompson
Bob Thompson am 13 Feb. 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jeff Miller
Jeff Miller am 13 Feb. 2018
If you convert your data into MATLAB's table format, PlotTbl may be useful (and save you a lot of nested for loops).
  1 Kommentar
wissam abdallah
wissam abdallah am 15 Feb. 2018
thank you Mr for your help. after checking the link you have sent i typed the following command climTable = table(ST_CODE, YEAR, MONTH, DAY, TMEAN); and now my variables overall have been reconstructed and integrated in the table climTable as they were in the file excel regards

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by