MATLAB: Finding average between TFunct1,TFunct2,TFunct3 average TFunct (1:17000,1)=mean(TFunct1(1:17000,1),TFunct2(1:17000,1),TFunct3(1:17000,1)); how to find it and store in TFunct? Best Answer Hi,how about this:TFunct=zeros(1700,1); % or whateverfor i = 1 : 17000TFunct(i,1)=mean([TFunct1(i,1),TFunct2(i,1),TFunct3(i,1)]);endor without a loop you can use this:>> A=[1 2;2 3;3 4;4 5;5 6]A = 1 2 2 3 3 4 4 5 5 6 >> B=[2 3;3 4;4 5;5 6;6 7]B = 2 3 3 4 4 5 5 6 6 7 >> C=[3 4;4 5;5 6;6 7;7 8]C = 3 4 4 5 5 6 6 7 7 8 >> D=[A(:,1)';B(:,1)';C(:,1)']D = 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7>> mean(D)ans = 2 3 4 5 6 Related SolutionsMATLAB: Dimension mismatch error in matrix. C(:, 2:2:2*size(B,2))=B; C(:, 1:2:end)=A; MATLAB: Breaking up matrix by values in column c=matrix(:,end) ;out=matrix(c>=2 & c<=4,:) Related QuestionFind element in arrayCan someone show me how to replace the 4th elements of vector a2 with c1, and name the new vector a4Multidimensional Arrays of different sizeHow to split a 420×7 matrix into 60 7×7 matricesConnected components in a graph
Best Answer