Tech Support Forum banner

Matlab Multcompare-HELP!!!!

1154 Views 0 Replies 1 Participant Last post by  Megg22
Hi,

Im new to MatLab (first day!!!) and am trying to use the Multcompare command. This is probably a really basic question but I cant figure it out and its bugging me!!

My data set is basically a 38X12 matrix of numbers with no headings etc.
The rows are 38 countries and the cols are months.
I couldnt figure out how to name the variables as their countries so I did:
Ireland =data(1,;)
England =data(2,;)
etc.
This worked fine.

I basically want to compare every country in my dataset to each other.The multcompare command seemed ideal but I cant work it.

Syntax=
[c,m,h] = multcompare(stats)

How do I compute a 'stats' structure with my data?I got "Undefined function or variable 'stats'." when I tried the command above.
When I tried
[c,m,h]=multcompare(Ireland,England), I got
"??? Error using ==> multcompare at 138
STATS must be a structure."

I can see from the example given:
[p,t,st] = anova1(MPG,Origin,'off');
[c,m,h,nms] = multcompare(st,'display','off');
[nms num2cell(m)]
ans =
'USA' [21.1328] [0.8814]
'Japan' [31.8000] [1.8206]
'Germany' [28.4444] [2.3504]
'France' [23.6667] [4.0711]
'Sweden' [22.5000] [4.9860]
'Italy' [28.0000] [7.0513]

that you can do it using anova1 etc but that data seems to be in a different format.

I want results like they got, for all the combinations of my countires.

Can anyone help me???

Thanks in advance,

Meg
See less See more
Status
Not open for further replies.
1 - 1 of 1 Posts
1 - 1 of 1 Posts
Status
Not open for further replies.
Top