필터 지우기
필터 지우기

How can I change the frequency range setting "power_zmeter('sys')" in a script?

조회 수: 2 (최근 30일)
Milad Kahrobaee
Milad Kahrobaee 2017년 5월 15일
답변: Dimitris Iliou 2017년 5월 19일
Hi, Is it possible to use the "power_zmeter('sys')" in a script to create the impedance freq figure with certain frequency range? without getting complex impedance using the "Zdata = power_zmeter('sys',freq)" Thanks, Milad

답변 (1개)

Dimitris Iliou
Dimitris Iliou 2017년 5월 19일
If I understand correctly, you want to use the power_zmeter command to create the impedance within a script and then plot it as well.
To do that you can follow the example as shown in the corresponding documentation page:
As the example shows, you can get the data for the impedance using the following code:
% This is from the example
Zdata = power_zmeter('power_gui',logspace(0,3,500))
where the frequency range is defined as the second argument.
Impedance is inherently a complex number so I do not understand why you need to calculate it without the imaginary part.
If you mean that you want to see the magnitude of the impedance then you can use the following command to plot your results:
plot(Zdata.Freq,abs(Zdata.Z(:,1)))

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by