【发布时间】:2019-03-21 10:18:33
【问题描述】:
我希望在将这两行 MATLAB 代码压缩为一个时得到相同的结果,但我没有!
两行代码:
[b,a]= butter(2,[0.4 0.6]) % Transfer function coefficients of the filter
[A,B,C,D] = tf2ss(b,a) % State-space representation of the filter
1 行代码:
[A,B,C,D]= butter(2,[0.4 0.6]) % State-space representation of the filter
黄油:
当
b,a是输出时返回transfer function coefficients当
A,B,C,D是输出时返回state-space matrices
tf2ss:
- 将
transfer function filter parameters转换为state-space形式
【问题讨论】:
-
当你运行
[A,B,C,D] = tf2ss(butter(2,[0.4 0.6]))时会发生什么? -
对于
B,第一个代码我得到[1;0;0;0],第二个代码是[0.58;0.19;-0.58;-0.19] -
@famansour 你的 MATLAB 版本是多少?我可以在 2018 年重现您的结果b
-
@Karls 是无效代码。
-
@AnderBiguri 我的版本是 R2018b !
标签: matlab signal-processing state-space transfer-function