I just want the MATLAB code for this question. I have my deadline one hour from
ID: 2078998 • Letter: I
Question
I just want the MATLAB code for this question. I have my deadline one hour from now. I shall be very thankful to you if you could help me get my code within the next hour. I shall be very grateful. Thankyou.
b A very long coaxial capacitor has an inner radius of pinner 1.0 x 10 m 3 and an outer radius of pouter 5.0 x 10 m 3. It is filled with a nonuniform dielectric characterized by ar 103 p. Find the capacitance of a 0.01 m long capacitor of this kind. Write a MATLAB program that finds the energy stored in this capacitor if the charge on the inner plate is Q 5.0 x 10- C. Use the formula WE Q2/2C to evaluate the capacitance again and compare your results pinnen pourer 5, 3103Explanation / Answer
clc;
Q=5*10^(-9);
fun1=@(x)(Q./8.85.*10.^-12.*10.^3.*x.*2.*pi.*x.*0.01);
voltage=integral(fun1,10*10^-3,50*10^-3);
energy=voltage.*Q;
Statement1=['Energy stored in capacitor',num2str(energy),'J'];
disp(Statement1);
Capacitance2=2*energy/(Q*Q);
Statement2=['Capacitance calculated from integral=',num2str(Capacitance2),'Farads'];
disp(Statement2);