Signal Generation:Random Noise

Thread Starter

naickej4

Joined Jul 12, 2015
206
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
 

Attachments

bertus

Joined Apr 5, 2008
22,277
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
 

Thread Starter

naickej4

Joined Jul 12, 2015
206
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
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.
 

WBahn

Joined Mar 31, 2012
30,062
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
 

Thread Starter

naickej4

Joined Jul 12, 2015
206
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
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:

josh007

Joined Sep 20, 2015
43
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
 

Kermit2

Joined Feb 5, 2010
4,162
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.
 

Attachments

Thread Starter

naickej4

Joined Jul 12, 2015
206
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.
 
Top