descriptive statistics in one line of code

조회 수: 2 (최근 30일)
Arturo Jr. Ongkeko
Arturo Jr. Ongkeko 2020년 12월 12일
답변: KSSV 2020년 12월 12일
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)

채택된 답변

KSSV
KSSV 2020년 12월 12일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by