NEED HELP FOR MATLAB SCRIPT
AC Power from a wall socket
The script needs to create 5 periods of a 60 Hz sinusoid, with an amplitude 120 Vrms, and have about 100 points per period.
Transformer
The script should them simulate the noisy sinusoid passing through a step down transformer. The turns ratio (N) should vary, and come from the user of the program being asked to enter a value between 2 and 20.
Rectifier
Ask the user whether they wish to pass the waveform through a full or half wave rectifier. Write one function that accepts the waveform and returns a half wave rectified waveform. Create another function that accepts a waveform and returns a full wave rectified. The script should call the correct function.
RC Filter
After the waveform is rectified, it then passes through a parallel RC circuit. Approximate the output waveform to be a decaying voltage where the voltage only decays for 1 period of the rectified waveform, then repeats. Assume a resistor of 1k?, but prompt the user to enter the capacitor value.
Write a function that takes a rectified waveform and returns a waveform that approximates an RC filter output.