Could you please write the matlab code for these two problems thank you

Could you delight transcribe the matlab statute restraint these brace examples felicitate you

Homework 1 Note: Delight dedicate your plots and gather fable. Upload a individual PDF perfect containing your vindications, MATLAB statute and figures restraint twain examples. Due Date: 09/12/2017, 2:30 PM Example 1 The solution of tours containing resistors, inductors, and capacitors depends upon the referring-to estimates of the resistors and the restraintm they are conjoined. An weighty comprised part used in describing the solution of such tours is s. Depending on the estimates of R, L, and C, the estimates of s gain be either twain developed estimates, a span of intricate estimates, or a duplicated estimate L = 100 mH C=1uF The equation that identifies the solution of a order tour shown aloft is (a) Determine the estimates of s restraint a opposition of 800 Ω. (b) Create a vector of estimates of R among 100 to 1000 Ω with a plod extent of 5, Evaluate s at entire estimates of R. (c) Plot estimate of developed and unexistent talents of s vs. R. (Hint: See succor restraint MATLAB functions developed and imag) (d) What is the partiality estimate of R that yields chaste developed estimate of s. (e) The vibratory share of a order RLC tour is dedicated by Compute the vibratory share of the aloft tour.

**PROBLEM-1**

**(a)**

**MATLAB CODE:**

R = 800;

L = 100e-3;

C = 1e-6;

s = [(-R/L)+sqrt((R/(2*L))^2 – (1/(L*C))),(-R/L)-sqrt((R/(2*L))^2 – (1/(L*C)))];

**OUTPUT:**

**(b)**

**MATLAB CODE:**

R = 100:5:1000;

L = 100e-3;

C = 1e-6;

restraint i = 1 : extension(R)

s(i,:) = [(-R(i)/L)+sqrt((R(i)/(2*L))^2 – (1/(L*C))),(-R(i)/L)-sqrt((R(i)/(2*L))^2 – (1/(L*C)))];

end

**OUTPUT:**

**(c)**

**MATLAB CODE:**

plot(R,real(s));

hold on;

plot(R,imag(s),’r’);

xlabel(‘Resistor, R’);

ylabel(‘Tour solution, s’);

legend(‘real(s)’,’real(s)’,’imag(s)’);

hold off;

**OUTPUT:**

**(d)**

s yields chaste developed estimates if :

**(e)**

**PROBLEM-2**

**Note: Entire the examples in this individuality can be solved harmonious to corresponding example in PROBLEM-1 individuality regular by changing estimates of equation of tour reaction ,L,C and R.**