필터 지우기
필터 지우기

How can I choose a set of columns from my table. I have to get the means of let's say columns 1 and 5, columns 2 and 6 etc from 20 columns. Thanks

조회 수: 2 (최근 30일)
Does this look like a correct line of code? x = mean(w(:,[1:4:10 11:4:20]));

채택된 답변

Sadik
Sadik 2017년 5월 26일
Looks correct. Means of columns 1 and 5, for instance, would look like this:
x = mean(w(:,[1 5]))
Best.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by