Docsity

MATLAB Assignment: Capacitor Discharge Circuit Simulation - Prof. M. Elseifi, Study notes of Civil Engineering

Partial preview of the text

Download MATLAB Assignment: Capacitor Discharge Circuit Simulation - Prof. M. Elseifi and more Study notes Civil Engineering in PDF only on Docsity!

CE

Assignment 6 1.

q0=12; R=50; L=5; C=1e-4; t=linspace(0,0.7,100)'; q1=q0exp(-Rt/(2L)); q2=cos(sqrt((1/(LC))-(R/(2L))^2)t); q=q1.*q2; plot(t,q) xlabel('Time') ylabel('Capacitor') 0 0.1 0.2 0.3 0.4 0.5 0.6 0.

    • 0 5 10 15 time capacitor

t=linspace(5,47,8) t = 5 11 17 23 29 35 41 47 3. v=(8:-0.5:0) v = Columns 1 through 7 8.0000 7.5000 7.0000 6.5000 6.0000 5.5000 5. Columns 8 through 14 4.5000 4.0000 3.5000 3.0000 2.5000 2.0000 1. Columns 15 through 17 1.0000 0.5000 0 4. F=[0.9 1.1 1.2 1.3 1.5]; x=[0.018 0.025 0.03 0.035 0.045]; k=F./x k = 50.0000 44.0000 40.0000 37.1429 33. U=0.5k.x.^ U = 0.0081 0.0138 0.0180 0.0227 0. max(U)

>> B=[0.5 -4 6 -1];

X2=roots(B) X2 =

7.

A=[-3 1 12; 6 -1 -1; 6 9 1] A = -3 1 12 6 -1 - 6 9 1 b=[50 3 40]' b = 50 3 40 X=A\b X =