Derivative filter in laplace domain

2 ビュー (過去 30 日間)
joeDiHare
joeDiHare 2012 年 4 月 23 日
I am trying to implement the simplest derivative filter, e.g.: H(s)=s, as:
H=tf([1 0],[1]);
output=lsim( H , input);
However, the expected error is that lsim "Cannot simulate the time response of models with more zeros than poles".
So, how do I implement it in Matlab?

採用された回答

Arkadiy Turevskiy
Arkadiy Turevskiy 2012 年 4 月 23 日
You can do this using diff command.
t=[0:0.01:10];
u=sin(t);
y=diff(u)./diff(t);
plot(t,u)
hold on
plot(t(2:end),y,'r')
HTH.
Arkadiy
  1 件のコメント
joeDiHare
joeDiHare 2012 年 4 月 24 日
Thanks.
This makes sense
Just wondering if there was any signal processing buil-in tool for that though.
Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFilter Design についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by