Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1494
Number of posts: 2174

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Multcompare VERY BASIC HELP!!!! Posted by Megg22 on 7 Jul 2010 at 2:24 PM
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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.