mean without stable step
    2 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hi all! I need your help please!
my data are 3033 lines and 2005 columns. I want to find the mean for all columns separately but the step in lines is different. For example, i want to find the mean for the first 167 lines, then from 168 to 294, 295 to 428 and so on. what code can i write?
Thank you!
0 件のコメント
採用された回答
その他の回答 (3 件)
  Mikhail
      
 2014 年 9 月 25 日
        You can write a=mean(M,2) - this will find mean of matrix M along each column. And then take only values you need. For 3033*2005 this is ok.
2 件のコメント
  Fani
 2014 年 9 月 25 日
        1 件のコメント
  Mikhail
      
 2014 年 9 月 25 日
				ok, so you create vector containing number of lines you want to take: a=[1:167,168...].
If you want to take into account only this lines for all columns, you can make new matrix: N=M(a,:). The new matrix contains only lines you need. And use mean.
参考
カテゴリ
				Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

