The second order differential equation: dt dt could describe the behavior of an
ID: 3349424 • Letter: T
Question
The second order differential equation: dt dt could describe the behavior of an electrical system, where x() is the input voltage and y() is the output voltage and dy/dt is the current. The complex ratio y(a) is called the frequency response of the system because it describes the relationship between input and output for sinusoidal excitation at a frequency of w and where j is V-1. Write a Matlab script program that reads in a value of and evaluates the frequency response for this value of w together with its polar form (magnitude and phase). Hint: use the built-in Matlab functions real (extract the real part of a complex quantity), imag (extract the imaginary part of a complex quantity), abs (returns the magnitude of a complex quantity) and atan2 (tan). Also, you may need to use the built-in Matlab constant i or j , where i = j = .Explanation / Answer
w=input('enter the angular frequency of the signal');
H=1./((1-w.^2)+2i.*w);
disp(['magnitude ' num2str(abs(H))]);
disp(['phase ' num2str(angle(H))]);
>> m36
enter the angular frequency of the signal 8*pi
magnitude 0.0015806
phase -3.0621
>>