how can I plot this function ?

조회 수: 4 (최근 30일)
Marcin Piasecki
Marcin Piasecki 2019년 11월 12일
답변: KSSV 2019년 11월 12일
Hi
I just started wit matlab, and I trying to plot this function by semilogx , but noting happend, how I can do that ?
"
function part 3
R1=1000 %Ohm%
C1=0.000000032;%F%
R2=1000 %Ohm%
C2=0.000000032;%F%
x=linspace(0,100,100)
function y=f(x)
y= 20*log(abs(1/(R1*R2*C1*C2))/((2*pi*(x))*(2*pi*(x))+(2*pi*(x))*(1/(R1*C1))+(1/(R2*C1))*(1/(R2*C2))))
semilogx (x,y);
xlabel("frequency");
ylabel("y(x)");
title("x");
end
end
"

답변 (1개)

KSSV
KSSV 2019년 11월 12일
Read about matlab element by element operations:
R1=1000 %Ohm%
C1=0.000000032;%F%
R2=1000 %Ohm%
C2=0.000000032;%F%
x=linspace(0,100,100)
y= 20*log(abs(1./(R1*R2*C1*C2))./((2*pi*(x)).*(2*pi*(x))+(2*pi*(x)).*(1/(R1*C1))+(1/(R2*C1))*(1/(R2*C2)))) ;
semilogx (x,y);
xlabel("frequency");
ylabel("y(x)");
title("x");

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by