Implementing factored form in MATLAB?
10 views (last 30 days)
Show older comments
I have a z transform in rational form as shown in attached photo
and i want to convert it into factored form
How can i implement it in MATLAB? I learnt from a google resource that we should use "zp2sos"command but i am not satisfied because output of "zp2sos"command does not looks like factored form
1 Comment
Walter Roberson
on 10 Mar 2021
By the way, you do not need to create an zpk intermediate form
z = tf('z');
H = (4*z^2+3*z+9)/(4*z^2+3*z-4)
H = [H, z/H] %just to give a more complicated system
HN = H.Numerator;
HD = H.Denominator;
HN = cellfun(@(C) C(find(C,1):end), HN, 'uniform', 0); %trim leading 0
HD = cellfun(@(C) C(find(C,1):end), HD, 'uniform', 0); %trim leading 0
Hsos = cellfun(@tf2sos, HN, HD, 'uniform', 0).';
celldisp(Hsos)
Answers (0)
See Also
Categories
Find more on GPU Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!