Signal Generation:Random Noise

Discussion in 'Homework Help' started by naickej4, Sep 22, 2016.

  1. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi All,
    Please can you assist me in checking my work. I have done the below questions in Matlab 6.5. I have attempted the first question but am not certain of my answer. Please can you also show me how to do the second part of the question (b). I do not understand what they mean by Zero Mean.

    Thank you.

    upload_2016-9-22_21-16-0.png

    function [] = Question1a()

    % ---------------------------------------------------------------
    % Question 1a
    % ---------------------------------------------------------------

    datapoint = 1000;
    t=0:1/datapoint:2;
    x=sin(2*pi*5*t);
    y=sin(2*pi*25*t);
    z= x + y;
    NoiseAmplitude = 1;
    Noise = x + NoiseAmplitude*randn(size(z));
    plot(t,Noise);
    title('Noise in the Amplitude interval (0,0,1,0)')
    ylabel ('Amplitude')
    xlabel ('Time(s)')

    upload_2016-9-22_21-18-42.png
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,348
    Hello,

    I do not know matlab, but I see that you have added noise to the 5t sinus.
    Is that what it is supposed to be?

    Bertus
     
  3. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Bertus, I think so, but I am not too sure though. I was trying to follow some examples from the internet but I was getting confused with the numerous approaches and then decided to come here to ask the experts for help as I always do. Is there a way to accomplish these tasks using C programming or to check my answer?

    thank you.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,804
    Where did the sin() waves come from?

    I don't see anything in the problem statement you provided that mentions two specific sinusoids. If they are mentioned in a different part of the problem, then doesn't it seem unreasonable to expect meaningful help on a problem if the problem isn't fully presented?

    As for zero mean: http://www.lmgtfy.com/?q=zero+mean
     
  5. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir those 2 sinusoidals i just randomly used them from an example on the Internet. It has nothing to do with the question. I just want to know if what I'm doing is correct in producing the noise signal. Also need help on the second part of the question. If this is not correct.Please can you help me or show me a link that can help me to answer these questions.Our lecturer tells us to use the Internet to find the answers or research them since our scope does not cover this so no notes from him and it will appear in our Practical exam which was moved to the 30th.Thanks for your help
     
    Last edited: Sep 23, 2016
  6. josh007

    Member

    Sep 20, 2015
    40
    1
    Greetings naickej4,

    This is very weird since we are also doing this at college and this is part of our tutorial question.

    I found this on the web:
    https://www.mathworks.com/matlabcentral/answers/86901-how-to-insert-noise-in-a-sine-function

    I think you just need to add the noise function into your summation of sinuous waves.
    But for question b I have not the fainest idea.
    but i think your function should read as follows, since z is your summation of sinuous waves.

    Noise = z + NoiseAmplitude*randn(size(z));

    Gracias
    Joshy
     
  7. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,795
    951
    I would suggest one of the data array methods.

    Here is a pdf with good basic info on probability theory that may be of help.
    Finally, Sinusoidal methods will always give sinusoidal data result variations when using a large enough sample set to analyze it.
     
  8. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Thanks Joshy007 and Kermit2. I really appreciate your help.

    Do either of you know Matlab? I want to equip myself before this exam.

    I think I do understand some basics from the Theory but its just this programming is getting to me. I am trying to find something useful on Youtube but they mostly have difficult questions as examples.

    thank you.
     
  9. Kermit2

    AAC Fanatic!

    Feb 5, 2010
    3,795
    951
Loading...