Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write the code \" not by hand writing \" because I will need to copy the code +

ID: 3858793 • Letter: W

Question

write the code " not by hand writing " because I will need to copy the code + upload the output   

The impedance of a certain RLC electrical circuit is given by: wL where resistance R= 225 ohms, capacitance C= 0.6 × 10-6 F, and inductance L 0.5 H. Write a computer program (using matlab) that uses Bisection Method, and calculates the angular frequency that results in an impedance of Z= 75 ohms. Use bracket of 1 and 1000, Continue the iterations until Ea falls below the pre-specified criteria of ,-0.1%. Note: See figure 5.11 for the pseudocode of Bisection Method Show the table of results in the following format: fa fa CD

Explanation / Answer

Matlab code:

format long;
R = 225; C = 0.6*(10^(-6));
L = 0.5; z = 75;
f = @(w) (sqrt(1/(R*R) + (w*C - 1/(w*L))^2 ) - 1/z);
a = 1;
b = 1000;
c = a;
EPSILON = 0.001;
iter = 1;
while ((b-a) >= EPSILON)
c = (a+b)/2;
if ((f(c)) == 0.0)
break;
elseif ((f(c))*(f(a)) < 0)
b = (a+b)/2;
else
a = (a+b)/2;
end
iter = iter + 1;
end
root=c

Sample Output: