How to compute Expectation in MatLab?
Mostra commenti meno recenti
Hello Guys,
I need to compute E{x^4} in MatLab (x is vector). Can it be done by taking the mean value of x^4 (each element of x exponent 4).
Thanks for the help. Regards
Risposta accettata
Più risposte (1)
Star Strider
il 25 Set 2014
That is how I would do it, using element-wise exponentiation:
Ex4 = mean(x.^4);
Categorie
Scopri di più su Get Started with MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!