how can I plot this function ?

2 ビュー (過去 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 Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by