Thank you very much for the deepening. I’m not understanding very well the code and as a consequence,I’m not able to plot. (I had to install a matlab product for running the entire code!) My aim should be plotting on the x-axis time(seasons) and on the y-axis data related to season with their average.
I added code to my answer to also output a bar plot for Var1 by season with error bars showing +/- 1 SD of the means. Unfortunately, I have no idea what measures correspond to the generic variable names, so the labelling isn't quite right. Edit accordingly.
What are the names of the measures corresponding to Var1, Var2, ... Var6?
Do you have names for the seasons? I'm only asking because of the unusual divisions given in your question (e.g. season 4 is February).
The bar chart is is just an example. It is for Var1. The season number is directly under each bar in the chart. The first bar is for the season 1 which is Dec+Jan, according to your definition. The height of the bar is the mean/average for the corresponding season and variable. For the first bar (season 1), the mean is 208.51. You can see the exact value in the statarray output table and you can also read the approximate value off the y-axis.
It's also possible, with a few extra lines of code, to display the mean value inside the bar. Send me names for the variables and seasons and I'll add this to the code.
I would just need the division I told you before: 1)Dec-Jan; 2) Mar to Oct; 3)Nov; 4)Feb.
So 1 is Dec-Jan, 2 is for Mar to Oct, 3 is for Nov and 4 is for Feb, right?
Yes, I saw the values in the table, but I was wondering where they come from. Do they come from Var5? (Because I have to take into account only that variable.)
Indeed, I noticed that in the previous code, using this script, I got different value for the mean: 58.125090122566690, 74.331828370156900, 65.709169913095600, 61.315059959507860.
So, for this reason, I was wondering which variable you were considering.
s3_var5_mean = mean(s3.Var5, 'omitnan'),
s1_var5_mean = mean(s1.Var5, 'omitnan')
s2_var5_mean = mean(s2.Var5, 'omitnan')
s3_var5_mean = mean(s3.Var5, 'omitnan')
s4_var5_mean = mean(s4.Var5, 'omitnan')
As a consequence, the names of other variables don't matter to me!
OK, I adjusted the code -- again. The anaysis now is only for Var5, which is the only variable you are interested in, apparently. The means are now displayed in the bars, as well.
Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.
Translated by
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.