필터 지우기
필터 지우기

I get these results. How can I make the small decimal zeros?

조회 수: 1 (최근 30일)
PETROS CHARMPATSIS
PETROS CHARMPATSIS 2023년 11월 2일
답변: Walter Roberson 2023년 11월 2일
0.004 s^4 + 7.426e-18 s^3 + 3.2 s^2 + 5.7077e-15 s
--------------------------------------------------
s^4 + 110 s^3 + 1020 s^2 + 8000 s + 16000

답변 (1개)

Walter Roberson
Walter Roberson 2023년 11월 2일
tol = 1e-7;
s = tf('s');
G = (0.004 * s^4 + 7.426e-18 * s^3 + 3.2 * s^2 + 5.7077e-15 * s) / ( s^4 + 110 * s^3 + 1020 * s^2 + 8000 * s + 16000)
G = 0.004 s^4 + 7.426e-18 s^3 + 3.2 s^2 + 5.708e-15 s ------------------------------------------------- s^4 + 110 s^3 + 1020 s^2 + 8000 s + 16000 Continuous-time transfer function.
Num = G.Numer; Den = G.Denom;
Adjust = @(V) V .* (abs(V) > tol);
Num = cellfun(Adjust, Num, 'uniform', 0);
Den = cellfun(Adjust, Den, 'uniform', 0);
G = tf(Num, Den)
G = 0.004 s^4 + 3.2 s^2 ----------------------------------------- s^4 + 110 s^3 + 1020 s^2 + 8000 s + 16000 Continuous-time transfer function.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by