Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C1=3.2e-8;
- C2=3.2e-8;
- RL=1e+3;
- R1=1e+3;
- R2=1e+3;
- myFunction = @(x) 0.7017-abs(((1)/(R1*R2*C1*C2))/(((j*2*pi*x)^2) +(j*2*pi*x)*(((1)/((R1*C1)))+((1)/(R2*C1))*((1)/(R2*C2)))+((1)/(R1*R2*C1*C2))));
- x_lower = 0
- x_upper = 1
- x_mid = (x_lower + x_upper)/2;
- while abs(myFunction(x_mid)) > 1e-11
- if (myFunction(x_mid) * myFunction(x_upper))<0
- x_lower = x_mid;
- else
- x_upper=x_mid;
- end
- x_mid = (x_lower + x_upper)/2;
- end
- fprintf('Root is %g\n',x_mid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement