Question: Solve in MATLAB Problem 2: Solving ODE's with Numerical Differentiation The RC circuit shown below has input voltage V(t). The voltage measured across the capacitor,

Solve in MATLAB

Solve in MATLAB Problem 2: Solving ODE's with Numerical Differentiation The RC

Problem 2: Solving ODE's with Numerical Differentiation The RC circuit shown below has input voltage V(t). The voltage measured across the capacitor, vc(t), is related to the input voltage V(t) bv the differential equation RC d'2 + v.(t)V(t). dt Vc The circuit components have values R-1 k? and C 0.1 mF. Suppose the input voltage V(t) is turned on until the capacitor is charged and then turned off. The governing differential equation then dvc(t) dt with the methods detailed below. Use values of vc(t-0)-2V and time-0 to 0.5 s. a) Write a script using an Euler method to solve the equation. Use two different time increments: 0.05 and 0.01 s. Plot the results using different color lines with individual markers. Use a LineWidth of 1.0 b) Use the MATLAB ode45 function. Plot the result using open-circle markers and a connecting line in red. Answer the following questions in comments at the end of your code: a. How many time points were used by the MATLAB ode45 function? How were they spaced? Note that you can use the MATLAB diff function to determine this. b. How did the results from the increments you used for the numerical solution match the results of the ode 45 function? -10t solution

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!