Problem 3
Obtain a graph of the plot produced by the command sequence $$ \begin{aligned} &t=\text { linspace }(0,3) \\ &y=t . *(t<1)+1 *(t>=1 \text { \& } t<2)+t . \sim 2 . *(t>=2) \\ &\text { plot }(t, y) \end{aligned} $$
Problem 5
\(f(t)=\left\\{\begin{array}{ll}-t, & \text { if } t<0, \\ t^{2}, & \text { if } t \geq 0,\end{array}\right.\) on the time interval \([-2,2] .\)
Problem 7
\(h(t)=\left\\{\begin{array}{ll}0, & \text { if } t<0, \\ t, & \text { if } 0 \leq t<2, \\ 2, & \text { if } 2 \leq t<4, \\ 6-t, & \text { if } t \geq 4,\end{array}\right.\) on the time interval \([-1,5] .\)
Problem 8
An \(R C\)-circuit is modeled by the equation $$ R C \frac{d V_{c}}{d t}+V_{c}=V(t), $$ where \(V_{c}\) is the voltage across the capacitor. Suppose that the resistance \(R=2.3\) ohms, the capacitance \(C=1.2\) farads, and the driving voltage of the circuit is supplied by $$ V(t)= \begin{cases}3, & \text { if } t<5 \\ 0, & \text { if } t \geq 5\end{cases} $$ Use df ield6 to sketch the solution of the circuit with initial condition \(V_{c}(0)=0\).
Problem 13
Consider again the \(R C\)-circuit of Exercise 8 , but this time the voltage source is an amplified square wave, with a period of thirty-two seconds and a duty cycle of \(25 \%\). Enter \(V_{-} c^{\prime}=\left(3 * s_{w}(t, 32,25)-V_{-} c\right)\) \(/(\mathrm{R} * \mathrm{C})\) in the DFIELD6 Setup window. Keep the parameters \(\mathrm{R}=2.3\) and \(\mathrm{C}=1.2\), and adjust the display window so that \(0 \leq t \leq 96\) and \(0 \leq V_{c} \leq 4\). a) Start a solution trajectory with initial condition \(V_{c}(0)=0\). b) Make the DFIELD6 Display window inactive with Options \(\rightarrow\) Make the Display Window inactive. Enter the following code in the MATLAB command window to superimpose the input voltage on the DFIELD6 Display window. $$ \begin{aligned} &\gg t=\text { inspace }(0,96,1000) ; \\ &\gg y=3 * \text { sqw }(t, 32,25) ; \\ &>\text { plot }(t, y) \end{aligned} $$ Think of the driving voltage as a signal input into the circuit and the solution trajectory as the resulting output signal. Note that the input signal has been somewhat attenuated; that is, the amplitude has decreased in the output signal. c) Lower the period of the square wave input by entering \(V_{-} c^{\prime}=\left(3 * s q w(t, 16,25)-V_{-} c\right)\) \(/(\mathrm{R} * \mathrm{C})\) in the DFIELD6 Setup window. Start a solution trajectory with initial condition \(V_{c}(0)=0\). Superimpose the square wave as you did in part b). Note that the output signal is even further attenuated. Repeat this exercise, using periods of 8 and 4 for the input voltage and note how the circuit attenuates input signals with smaller periods (higher frequencies). Why would engineers name this circuit a low pass filter?
Problem 14
The plot shown in Figure \(6.14\) is called a sawtooth wave. It has period six and amplitude three. Figure \(6.14\) was produced with the following MATLAB commands. \(>t=\) linspace \((0,24,1000) ;\) \(\Rightarrow y=3 * \bmod (t, 6) / 6\); \(\Rightarrow\) plot \((t, y)\) \(\gg t=l i n s p a c e(0,24,1000) ;\) \(\gg y=3 * \bmod (t, 6) / 6 ;\) \(\gg\) plot \((t, y)\) \(>\operatorname{set}(g c a, ' x t i c k ', 0: 3: 24)\) \(\gg \operatorname{set}(\) gca, ' \(x t i c k\) ' \(, 0: 3: 24\) ) Draw sawtooth waves a) with period 3 and amplitude 1 . b) with period 4 and amplitude 3 . c) with period 8 and amplitude 4 .