Thread Subject: Creating Irregular Matrices and Anova1

Subject: Creating Irregular Matrices and Anova1

From: Tom Philp

Date: 16 Nov, 2009 16:08:01

Message: 1 of 2

I am trying to create an irregular array/matrix from 5 differently sized matrices. I only want to take one row from each original matrix, but the number of cells in each row differ between matrices. Is it possible to create an irregular matrix in this way in Matlab?

If it is possible, I was hoping to then transpose this irregular matrix and use the anova1 function to compare the means of each column and to provide statistics for use in multcompare. Is it possible to use anova1 with an irregular matrix like this?

Thanks

Subject: Creating Irregular Matrices and Anova1

From: Peter Perkins

Date: 19 Nov, 2009 00:17:32

Message: 2 of 2

Tom Philp wrote:
> I am trying to create an irregular array/matrix from 5 differently sized matrices. I only want to take one row from each original matrix, but the number of cells in each row differ between matrices. Is it possible to create an irregular matrix in this way in Matlab?

There are several ways you might do this, but if your goal is to call ANOVA1, then you probably want to use a "grouping variable" instead. Put all your values in a single vector, and create another "parallel" vector that has the value 1 for values from the first array, and so on.

Hope this helps.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
multcompare Tom Philp 16 Nov, 2009 11:09:11
anova1 Tom Philp 16 Nov, 2009 11:09:11
irregular Tom Philp 16 Nov, 2009 11:09:10
rssFeed for this Thread

Contact us at files@mathworks.com