Question: Problem: The voltage in a second-order RLC circuit is given by u(t) = 0.5(4006(ft)+9 sin( t)) Volts (Volts). where t is time in seconds and
Problem: The voltage in a second-order RLC circuit is given by u(t) = 0.5(4006(ft)+9 sin( t)) Volts (Volts). where t is time in seconds and 1 is signal frequency in [Hz]. Create an mhle that 1. Defines a function ywvtt) that calculates valuels) of voltage in time using sigral frequency Define function at the end of the same M file Provide function help describing the function, how it is used to syvio, and what are inputs and outputs of the function 2. Creates a time vector, t, that starts at and ends at 2 seconds with increments of 0.001 3. Asks user to input frequencies 1 and 2 an numbers between 4 and 12 Hz hint: use "str2num/cell2mat/inputdle to allow publishing of the result 4. Checks #both f1 and 12 are between cand including 4 and 12 H 5. If they are not print error message describing the error and exit. 6. If the frequencies are between 4 and 12 Hr calculate the voltage according to the given formula above for frequencies 11 and 12. You will have 2 different voltage vectors - call them v1 and 2. - plot both vectors versus time on the same figure. Include labels for both awes as well as the title of the figure. Include a legend and plot grid. Each plot should be a solid line but in different colors with no markers Print a statement using print describing values of frequencies f1 and 12 as floating point numbers and two decimal digits
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
