Q:

Create an ordinal categorical array to store the four seasons

0

Create an ordinal categorical array to store the four seasons. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

>> 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

total answers (1)

Similar questions


need a help?


find thousands of online teachers now