Question: 1. (a) Consider the differential equation which describes the voltage v across a ca- pacitor in a source free RC circuit: du 1 dt +RCU=
1. (a) Consider the differential equation which describes the voltage v across a ca- pacitor in a source free RC circuit: du 1 dt +RCU= 0. Using ode23 simulate this differential equation, and use MATLAB to draw a graph of u against t on suitable time axes which illustrate the behaviour. To get you started, define a function rc in a file rc.m: function dv=rc(t,v) dv(1) = -0.1 * v(1) and use: [t,v]=ode 23 (@rc, [0 10],[10]) plot(t,v) Explain the syntax of this. What is the value of RC being considered in the above? What is the initial condition? In another figure plot a graph of the solution that we derived in lectures, namely v(t) = vo exp (RC) and compare the result for a suitably chosen value of vo. (b) Now investigate varying R and C. On a single figure (use hold on and hold off) plot graphs for a range of values of RC. Explain the trends you see in your own words. Also vary the initial condition (take both positive and negative values). You should document your investigation carefully. Document your code fragments, and include printouts of the figures, together with any annotations you make. Make sure all the axes are labelled. You might want to investigate the command publish to assist you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
