finding the average of each 100 points out of 1000000 data points?

조회 수: 4 (최근 30일)
1-I have a wave that returns 1000000 data points in an array of elements, and i want to find the average of each 100 points of the 1000000, which means that i should expect an array of 1000000/100 = 10000 elements.
2- say that the image below is at highest 2v but when you zoom in you find that that some data points that look at HIGH level are very much below 2v and at LOW level, so i want to find average overall and a smooth square wave that consists of either HIGH or LOW (square-wave) .
Hope i can find some answers or ideas!

채택된 답변

Guillaume
Guillaume 2017년 5월 29일
For 1.:
avgwave = mean(reshape(yourwavevector, 100, []));
I have no idea what it is you're asking with 2.
  댓글 수: 1
Mussab Elharan
Mussab Elharan 2017년 5월 30일
Thanks for your above given answer!
As for the second question what i am looking for is kind of smoothing/filtering to the wave i have above,
so that the final results of wave becomes something like the image attached below:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by