Box Plots for Vectors of Varying Length
Show older comments
Hello! I have 3 data sets named DailyTMAX_1, DailyTMAX_2, and DailyTMAX_3. Each one of them have maximum temperature data. DailyTMAX_1 from years 1931-1960, DailyTMAX_2 from 1961-1990, and DailyTMAX_3 from 1991 to 2020.
The three of them have varying lenghts. DailyTMAX_1 is 10321, DailyTMAX_2 is 11243 and DailyTMAX_3 is 10792.
I want to create a boxplot but every time I run it I get this message:
"Error: File: ClimateDataProcessor.m Line: 107 Column: 14
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters."
Line 107 Column 14 corresponds to g1 on the attached code
x = [DailyTMAX_1; DailyTMAX_2; DailyTMAX_3];
g1 = repmat({‘1931-1960’},10321,1);
g2 = repmat({‘1961-1990’},11243,1);
g3 = repmat({‘1991-2020’},10792,1);
g = [g1; g2; g3];
boxplot(x,g)
Hope anyone can help me with this
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!