descriptive statistics in one line of code

2 vues (au cours des 30 derniers jours)
Arturo Jr. Ongkeko
Arturo Jr. Ongkeko le 12 Déc 2020
Réponse apportée : KSSV le 12 Déc 2020
Hi,
Is there a way to write these in one line of code?
mu_age=mean(age)
mn_age=min(age)
mx_age=max(age)
sigma_age=std(age)

Réponse acceptée

KSSV
KSSV le 12 Déc 2020
A = rand(1,10) ;
v = [min(A), max(A), mean(A), std(A)] ;
v(1) % min
v(2) % max
v(3) % mean
v(4) % std

Plus de réponses (0)

Catégories

En savoir plus sur Descriptive Statistics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by