I want to plot the output x1, for 100 times on same graph. Since i am introducing randn noise in signal, output must be changing little bit everytime. Therefore, i can figure out, effect of noise on the signal. Thanks in advance.
t = [ 0 : 1 : 40 ]; % time samples
f = 500; % input frequency
fs = 8000; % sampling frequency
x = sin(2*pi*f/fs*t);
init_phase = randn(1,length(t));
x1 = x + init_phase;
plot(x1);

 채택된 답변

bio lim
bio lim 2015년 7월 14일
편집: bio lim 2015년 7월 15일

0 개 추천

t = [0 : 40]; % time samples
f = 500; % input frequency
fs = 8000; % sampling frequency
x = sin(2*pi*f/fs*t);
for k = 1 : 100
init_phase(k, :) = randn(1,length(t));
x1(k,:) = x + init_phase(k,:)
end
plot(x1);

추가 답변 (1개)

Mayank Lakhani
Mayank Lakhani 2015년 7월 14일

0 개 추천

Thanks coffee :). This will help me.

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2015년 7월 14일

편집:

2015년 7월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by