Create an ordinal categorical array to store the four seasons
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:8| Question number:28.8
All Answers
total answers (1)
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:8| Question number:28.8
total answers (1)
>> seasons = {'Summer', 'Fall', 'Winter', 'Spring'};
>> seasonset = {'Fall', 'Summer', 'Spring', 'Spring', ...
'Winter', 'Summer'};
>> ordss = categorical(seasonset, seasons, 'Ordinal', true)
ordss =
Fall Summer Spring Spring Winter Summer
>> summary(ordss)
Summer Fall Winter Spring
2 1 1 2
need an explanation for this answer? contact us directly to get an explanation for this answer