What is the difference b/w these 2 c2d options?

2 次查看(过去 30 天)
Type this in matlab:
>> s=tf('s'); Hs=exp(-2*s)*(5*s+1)/(s*s+8*s+16)
What is the difference between:
>> Hd=c2d(Hs,0.1,'tustin')
and
>> Hd=c2d(Hs,0.1,'method','tustin')
?
It blows my mind, but the result is different! I didn't find any clarifing answer in the help.

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-14
编辑:Azzi Abdelmalek 2016-8-14
I found the behavior weird, but I could find the eplanation, It seems that the function c2d recognize what method to use by reading the first letter of the first string. You have five methods 'zoh', 'foh', 'impulse', 'tustin', or 'matched'
Hd1=c2d(Hs,0.1,'tutsin') % or
Hd1=c2d(Hs,0.1,'t') % or
Hd1=c2d(Hs,0.1,'tall')
The three previous lines of code are using the same method 'tutsin', because the first letter is t
The following code use 'matched' method, because the first letter in the string 'method' is m, the second string 'tutsin' is ignored
Hd1=c2d(Hs,0.1,'method','tutsin')

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by