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

amp/Desktop/ICA 5pdf is a magic square with a magic constant of 34 TASK 4 ENGR 1

ID: 3591040 • Letter: A

Question

amp/Desktop/ICA 5pdf is a magic square with a magic constant of 34 TASK 4 ENGR 111-Fall 2017-3 For electrical power engineering, supercapacitors are a promising way to store power. When a resistor (R), and capacitor (C), and a battery(V) are connected in series, a charge Q builds up on the capacitor according to the formula Q(t) CV(1-eRc) if there is no charge initially present on the capacitor at time t-0. You are given the parameter values C- farad, V-9 volts, and R-4 ohms. (The units will cancel out to yield Q in coulombs.) The exponential function evaluated at x is given in MATLAB by exp (x) Write a MATLAB script (charge_n that will output the charge value Q(in units of coulombs) on the capacitor every 0.1 seconds from 0 to 8 seconds. Make two versions: charge_1: use a loop of some sort, charge_2 use MATLAB array-based commands. dy | Guided. ICA 5pdf-Microsoft DOLL

Explanation / Answer

f%%charge_1.m

C=1;
V=9;
R=4;
Q=zeros(1,length(0:.1:8));
k=1;
for t=0:.1:8
Q(k)=C*V*(1-exp(-t/(R*C)));
k=k+1;
end

%%charge_2.m

C=1;
V=9;
R=4;
t=0:.1:8;
Q=C*V*(1-exp(-t/(R*C)));