Borrar filtros
Borrar filtros

How to apply a ttest for specific months?

4 visualizaciones (últimos 30 días)
HA
HA el 12 de Jul. de 2019
Respondida: Sai Sri Pathuri el 17 de Jul. de 2019
Hello,
I have a large matrix of 2520x192x144, (month x lon x lat). I would like to do a ttest to compare each year with the same month (ttest of year1 Jan, year2 Jan...... year210Jan) for each month (end result = 12 192x144 matrices).
What would be the best way to set this up?
Thank you,
Holly

Respuesta aceptada

Sai Sri Pathuri
Sai Sri Pathuri el 17 de Jul. de 2019
Hi,
Let the large matrix of dimensions 2520x192x144 be ‘A’. To compare data related to a month for all years, the data is to be separated based on months and t-test is perfomed on each.
month_data=A(month_number:12:2520,:,:);
h=ttest(month_data);
For Example,
January_data=A(1:12:2520,:,:);
January_test=ttest(January_data);
This produces a matrix of dimension 1x192x144. Thus all months give 12 matrices.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by