# Analysis of first order RC using Matlab

I finished designing the given circuit using Matlab but I am getting some weird output results on oscilloscope.   and here is what I did I used the commands to define the R, F , C, and everything else, then I used Simulink to design and simulate. should not the output be some sinusoidal waveform ? could you please help me out on this? it is asking for the gain? how do I find the gain from this oscilloscope output ?

• If your frequency f is 250 Hz and the time scale in the oscilloscope plot is in seconds the result could be right. Have you tried zooming in? Your cutoff frequency is $f_c = \frac{1}{2 \pi R C} = 1061.03 Hz$, and you are injecting a 250 Hz signal, so it should not be attenuated very much at all. – FullmetalEngineer Feb 16 '15 at 3:38
• so how do I figure out the gain from this ? – user65652 Feb 16 '15 at 13:53
• Gain is V2/V1. You know V2. You know V1. – FullmetalEngineer Feb 16 '15 at 17:55
• yes I know that, but based on the graph which one is V1 and v2? – user65652 Feb 17 '15 at 0:35
• My guess is that the mux is there so that the "oscilloscope" can display both V1 and V2. I'm not sure but I think V1 and V2 might both be displayed in the plot - V1 is the yellow waveform and V2 is the pink one. If that's the case, V1's amplitude is simply 1. – FullmetalEngineer Feb 17 '15 at 0:51