Plotting Square wave from pressure signal

2 ビュー (過去 30 日間)
Tehreem Syed
Tehreem Syed 2020 年 8 月 17 日
コメント済み: Tehreem Syed 2020 年 8 月 17 日
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
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);
  1 件のコメント
Tehreem Syed
Tehreem Syed 2020 年 8 月 17 日
Thanks for your answer. We also have point c. I am detecting peaks using findpeaks function. I am getting both point c and d. I am not getting the required result using this logic.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by