필터 지우기
필터 지우기

Kruskalwallis test to struct

조회 수: 1 (최근 30일)
Ziv Kassner
Ziv Kassner 2015년 6월 14일
편집: Matt J 2015년 6월 14일
I have a 1X4 struct array with fields that contains different dimensions of matrices and I want to check if there is a difference between the different means. the problem is the dimensions of the data. how can I solve it?
  댓글 수: 1
Jan
Jan 2015년 6월 14일
Please post what you have tried so far. The current description is too general to give a useful advice. Add the relevant part of the code by editing the question, not by adding a comment. Thanks.

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2015년 6월 14일
편집: Matt J 2015년 6월 14일
A for-loop would work fine, but if you want to be a little fancier, you can use arrayfun,
fun=@(i) mean(yourStruct(i).yourField(:));
Means=arrayfun(fun,1:4);
I assumed here that you wanted the total mean over all elements in each matrix -- it was a little unclear -- but it should be a starting point for whatever it is you really want.

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by