필터 지우기
필터 지우기

Can't calculate magnitude and phase of a transfer function

조회 수: 9 (최근 30일)
Connie Dubh
Connie Dubh 2020년 11월 10일
답변: Mathieu NOE 2020년 11월 13일
I know of the commands abs() and angle(), but for some reason they're not working.
This is what I'm working with:
clear all
syms Req R_6 L C w
num1 = -Req*w^2/(Req+R_6)
den1= (-w^2 + 1/(L*C)) + 1i*(w/(C*(Req+R_6)))
func = num1/den1
abs(func)
angle(func)
However, it doesn't solve anything, it just says that the complex magnitude is |func| and that the phase is angle(func). How do I get the proper expressions?
  댓글 수: 2
VBBV
VBBV 2020년 11월 11일
Which version of matlab are you using ?
VBBV
VBBV 2020년 11월 11일
You require some inputs values for symbilic variables in your func

댓글을 달려면 로그인하십시오.

답변 (1개)

Mathieu NOE
Mathieu NOE 2020년 11월 13일
hi
ok , I am using any symbolic stuff here
numerically speaking , everything works fine (as soon as there are dots when needed)
Req = 1
R_6 = 1
L = 1
C = 1
w = logspace(0,3,10)
num1 = -Req*w.^2./(Req+R_6);
den1= (-w.^2 + 1/(L*C)) + 1i*(w/(C*(Req+R_6)));
func = num1./den1;
abs(func)
angle(func)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by