Filter löschen
Filter löschen

finding average between TFunct1,TFunct2,TFunct3

3 Ansichten (letzte 30 Tage)
Amit
Amit am 20 Nov. 2014
Beantwortet: Julia am 20 Nov. 2014
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?

Akzeptierte Antwort

Julia
Julia am 20 Nov. 2014
Hi,
how about this:
TFunct=zeros(1700,1); % or whatever
for i = 1 : 17000
TFunct(i,1)=mean([TFunct1(i,1),TFunct2(i,1),TFunct3(i,1)]);
end
or 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

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by