Signal cutting
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Jan
am 4 Feb. 2011
Please show, what you have tried exactly. How are the limits of periods stored or determined?
Akzeptierte Antwort
Mantas
am 4 Feb. 2011
2 Kommentare
Walter Roberson
am 4 Feb. 2011
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
am 4 Feb. 2011
@Mantas: Please delete this answer, and insert it as *comment* to Walter's answer.
Weitere Antworten (2)
Walter Roberson
am 3 Feb. 2011
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.
0 Kommentare
Mantas
am 4 Feb. 2011
4 Kommentare
Walter Roberson
am 5 Feb. 2011
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.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!