Plotting Square wave from pressure signal
이전 댓글 표시

Hi,
I have pressure signal collected from the sensors placed under foot. Findpeaks function was used to detect points (c and d). Point ( and b) are the zero crossing. I want to plot sqaure wave from this signal for the following interval:
If pressure signal is greater than point (a) and equal to or less than point d
new_signal = 1;
else if pressure signal is greater than point (b) and equal to or less than point f
new_signal = 0;
How i can plot this in matlab?
답변 (1개)
Antonio Ciociola
2020년 8월 17일
편집: Antonio Ciociola
2020년 8월 17일
This can be done transforming your signal into an arry of logic values:
sig_bool = (signal>a & signal<=d);
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!