필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Reading in the values from excel

조회 수: 1 (최근 30일)
soyfrijole
soyfrijole 2017년 12월 5일
마감: MATLAB Answer Bot 2021년 8월 20일
I have made a program the reads in values from an excel table and in order to find the average of n number of values in a column. The problem that I am having is I only know how to find the average of all the values in a column, not just the first 10 values in the column. If someone could help I'd appreciate it.
if true
if y == 0.2
column = 3;
x = mean(data_in(:,3));
s = std(data_in(:,3));
end

답변 (1개)

KL
KL 2017년 12월 5일
replace
x = mean(data_in(:,3));
with
x = mean(data_in(1:10,3));
1:10 could be any number indices within its limits
  댓글 수: 2
soyfrijole
soyfrijole 2017년 12월 5일
Oh thank you. I was trying to do (n,3) and kept getting an error.
KL
KL 2017년 12월 6일
편집: KL 2017년 12월 6일
n should be a vector, like in my example,
n = 1:10
if they are not continuous then,
n = [1 3 8 9 15 ...]

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by