why is there a big difference between trapz and mean
Afficher commentaires plus anciens
Hello together, I have the following Problem:
my 2D Vector of a measured Temperatur is T_ZA1.
I Need the mean value, but if I calculate the mean value with:
T_mean_=mean(mean(T_ZA1))
the value is: 121.145.
When I calulate the mean value with trapz like:
T_mean_int=trapz(trapz(T_ZA1,2))/length(T_ZA1(:,1))/length(T_ZA1(:,:));
the value is 47.0566.
Why is this such a big difference? It is not plausible.
Can someone help me please?
Best regards
Réponse acceptée
Plus de réponses (2)
See what happens:
function main
A=[2 5; 3 6];
m11 = mean(A,1)
m12 = mean(m11)
m21 = trapz(A,1)
m22 = trapz(m21)
Best wishes
Torsten.
GUY Shareman
le 4 Juin 2018
0 votes
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!