How can I handle a square wave input in a MATLAB function block?

3 ビュー (過去 30 日間)
Vicky S
Vicky S 2015 年 6 月 24 日
コメント済み: Vicky S 2015 年 6 月 26 日
I am currently working on embedding a controller code. The input to the code is in the form of square wave pulses and as per my understanding it is handled as a time-series object. But none of the time-series commands to extract fields is plausible. Request your input on this issue.

採用された回答

Drew Davis
Drew Davis 2015 年 6 月 25 日
Assuming you are using the pulse generator, the default output of this block is a double, so no additional processing is needed to be performed inside the MATLAB function block to obtain the value of the signal
  1 件のコメント
Vicky S
Vicky S 2015 年 6 月 26 日
Hi Mr Davis, I am trying to process the rising edge and falling edge to calculate pulses per second and other parameters like pulse duration. It is to calculate a angular speed of a shaft with the help of a teethed rotor shaft and proximity sensor. I am trying to simulate this with a variable square wave generator and need to assess the rpm from this.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSwitches and Breakers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by