How to enter vector coefficients to z-transform
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
TeraWatt
am 20 Nov. 2023
Beantwortet: Paul
am 21 Nov. 2023
I have this z-tf:
Hz = g *(1 + 2*z^-1 + z^-2) / ( 1 + a1*z^-1 + a2*z^-2)
where g = [2,2.2,2.3] , a1 = [2, 5,8] and a2 =[ 1,0.3,0.4]
how can I get all 4's Hz (TF) directly by using the vector coeficients?
2 Kommentare
Paul
am 20 Nov. 2023
Hi TeraWatt,
Seems like there should only be three transfer functions.
What is the desired form? A single system with three inputs and three outputs? An 3-element array of single-input/single-outpu transfer functions? Something else?
Akzeptierte Antwort
Walter Roberson
am 20 Nov. 2023
Bearbeitet: Walter Roberson
am 20 Nov. 2023
z = tf('z')
g = [2,2.2,2.3] .';
a1 = [2, 5,8] .';
a2 =[ 1,0.3,0.4] .';
HZ = arrayfun(@(G,A1,A2) G * (1 + 2*z^-1 + z^-2) / ( 1 + A1*z^-1 + A2*z^-2), g, a1, a2, 'uniform', 0);
HZ = vertcat(HZ{:})
1 Kommentar
Weitere Antworten (1)
Paul
am 21 Nov. 2023
g = [2,2.2,2.3];
a1 = [2, 5,8];
a2 =[ 1,0.3,0.4];
HZ = tf(zeros(3),'Ts',-1);
for ii = 1:3
HZ(ii,ii) = tf(g(ii)*[1 2 1],[1 a1(ii) a2(ii)],-1,'Variable','z^-1');
end
HZ
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!