Signal cutting

조회 수: 13 (최근 30일)
Mantas
Mantas 2011년 2월 3일
Hello,
I have a sine signal, and I want to remove say every third period, and then to combine all the pieces without that every third period. I was trying to use "for" cycle, but didn't work out. Maybe someone knows the code concerning this issue?
Many thanks
  댓글 수: 1
Jan
Jan 2011년 2월 4일
Please show, what you have tried exactly. How are the limits of periods stored or determined?

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

채택된 답변

Mantas
Mantas 2011년 2월 4일
Thanks Walter, but that's not the point, every third period has different power, and I need to remove it.
  댓글 수: 2
Walter Roberson
Walter Roberson 2011년 2월 4일
Then it is not a sine signal.
Is the period of the signal known in advance, or do you already have zero-crossing detection code?
Jan
Jan 2011년 2월 4일
@Mantas: Please delete this answer, and insert it as *comment* to Walter's answer.

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

추가 답변 (2개)

Walter Roberson
Walter Roberson 2011년 2월 3일
If you are splicing it together with every N'th period removed, then since sine signals are periodic, the effect would be the same as just shortening the signal by the number of samples that would be erased.

Mantas
Mantas 2011년 2월 4일
Sorry for misleading, it is a harmonic signal :) Anyway, one issue became more important to me now. I have a noisy periodical signal in a file with 100 periods (period is known) and I need to sum these periods and average them into 1 period. Any ideas?
Appreciate!
  댓글 수: 4
Walter Roberson
Walter Roberson 2011년 2월 5일
The code I showed creates a single period with each point being the mean of the corresponding points over all of the periods. This appears to answer to your requirement that they be "averaged" in to 1 period.
The alternative interpretation, that you want to sum each of the periods (which would produce one total number per period) and then take the mean value of those (which would result in one number *total*), does not agree with your requirement to "average them in to 1 period".
Please clarify the size of the output you are expecting, and perhaps give a formula.
Mantas
Mantas 2011년 2월 5일
Sorry for not very clear statements. So I have a periodic random signal of 200k samples, there are almost 200 periods in the signal. One period carries all the information I need, but because it is a random signal it needs to be averaged to preview the best shape. (sum all the periods and divide by the number of them)

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by