Operation of specific elements of a matrix

조회 수: 1 (최근 30일)
Alexis Villacis
Alexis Villacis 2018년 12월 18일
답변: madhan ravi 2018년 12월 18일
I have a matrix of dimensions 3000x3.
I need to compute statistics for the elements (1,1),(4,1),(7,1), (10,1),...,(3000,1)
how can I code this statistic i.e mean? It is basically the mean of the elements of the first colum, which are in rows 1,4,7,10...3000 i.e i+3?

채택된 답변

madhan ravi
madhan ravi 2018년 12월 18일
mean(matrix(1:3:end,1))

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by