文章程式碼顯示

2017年8月30日 星期三

Matlab應用:Laplace轉移函式的建立與多項式分解(合併)

%Laplace 練習
clear;
clc;

syms s t a; %指定為符號變量
x1t = sin(2*t)
x1s = laplace(x1t,t,s)

x2t = exp(-a*t)
x2s = laplace(x2t,t,s)

x4t = dirac(t)
x4s = laplace(x4t,t,s)

x5t = heaviside(t)
x5s = laplace(x5t,t,s)

x6t = heaviside(t-a)
x6s = laplace(x6t,t,s)

%逆變換
x3s = s^2/(s^2+3*s+2)
x3t = ilaplace(x3s)

% 藉由係數建立多項式
a = [-2 7 19];
s7s1 = poly2sym(a,s)

%建立轉移函數
num = [-2 7 19];
den = [1 5 17 13];
x8s = tf(num,den)

%部分分式展開
a1 = [5 3 -2 7];
b1 = [-4 0 8 3];
x8s = tf(a1,b1)
[r p k] = residue(a1,b1)

%部分分式合併
[b,a] = residue(r,p,k)

↓↓↓ 連結到部落格方針與索引 ↓↓↓

Blog 使用方針與索引