Question: answer this matlab problem statement and work through each point of the problem. Please work this out in MATLAB only! Thanks! Problem statement: The RC

answer this matlab problem statement and work through each point of the problem. Please work this out in MATLAB only! Thanks!
Problem statement:
The RC circuit shown is composed of a resistor, a capacitor, and a DC voltage source:
where V0=12V,R=3800, and C=400010-6F. The voltage on the capacitor VC
gradually increases when the switch is closed. Theoretically, VC as a function of time is given by:
VC=V0[1-e-tRC]
Goal: Create a plot of voltage VC vs. time t.
Write a function program the following features (template provided):
(a) Name the function voltageTheo.
(b) Name the input argument to the function as time and the output argument as voltage.
(c) Assign the values for V0,R, and C to the variables V0, R, and C, respectively.
(d) Using the equation given above, the function calculates the theoretical voltage VC(voltage)
for each value of time t(time). Use element-wise operations as needed.
Write a script program that performs the following (template provided):
(a) Create a row vector with 200 equally spaced values for time from 0 to 50. Assign the vector
to the variable t_theo.
(b) Call the function voltageTheo with t-theo as the input and assign the output to V-theo.
(c) Create a plot of voltage VC vs. time t for the theoretical data (as a solid red line).
(d) Label the horizontal axis as "Time, t(s)" and the vertical axis as "Voltage, V_C (V)".
(e) Add a title to the plot that reads "Plot of the capacitor voltage for an RC circuit."
Submit:
Each of your programs (function and script) as separate m-files. Do not submit the plot.
A single docx-file containing both programs (function and script). Do not submit the plot.
Extra-credit (+5%): Use MATLAB's "Publish" feature to create a PDF file.
 answer this matlab problem statement and work through each point of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!