필터 지우기
필터 지우기

How do I find means of samples and then mean of the means?

조회 수: 3 (최근 30일)
Rabeca Mohammed
Rabeca Mohammed 2021년 10월 5일
답변: Kevin Holly 2021년 10월 5일
I have a 1000*25 vector with random integers from 1–1000000. Rows signify samples so I have 1000 samples, each having 25 random integers. How do I find the mean of each row/sample and then the mean of all the means (1000 means)?

답변 (1개)

Kevin Holly
Kevin Holly 2021년 10월 5일
Although it sounds like a homework question, I'll answer it since it is basic.
random = randi(1000000,1000,25);
mean_row = mean(random,2);
Mean_mean_row = mean(mean_row);
I would suggest taking the MATLAB Onramp course.
Documentation on functions used:

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by