matrix manipulation,want to find mean value?
    11 ビュー (過去 30 日間)
  
       古いコメントを表示
    
having matrix W. its size is 7x50. totally 350 elements. in this column'1' have to find mean value of 4 elements then subtracts this value with remaining mean value of 3 elements. want to get this mean value up to 50 columns.how to implement this?
0 件のコメント
採用された回答
  nanren888
      
 2013 年 2 月 23 日
        "subtracts this with" ? .
Try something like
.
homeworkVec = mean(W(1:4,:),1)-mean(W(5:7,1),1);
In mean(x,1), the "1" is default. I just put it in to be explicit.
homeworkVec = mean(W(1:4,:))-mean(W(5:7,1));
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
				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!

