Add white noise with 0 mean and 1 std
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yovel
am 28 Dez. 2022
Kommentiert: Walter Roberson
am 28 Dez. 2022
Hello,
This is my equations.
w(k) is white noise 0 mean and 0.1 std.
how do i write w(k) ?
syms x1 x2
for k=1:1:100
if k==1
x1(k)=1;
x2(k)=1;
end
x1(k+1)=x1(k)+(exp(-k))*x2(k)+w(k);
x2(k+1)=0.95*x2(k);
plot(k,x1(k),'.'); hold on
end
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 28 Dez. 2022
w = @(k) randn(size(k)) ;
2 Kommentare
Image Analyst
am 28 Dez. 2022
w = @(k) randn(size(k)) ;
% Generate an image
k = ones(15, 20);
noisyImage = w(k)
imshow(noisyImage, []);
axis('on', 'image');
fprintf('Mean = %g, StdDev = %g.\n', mean2(noisyImage), std2(noisyImage))
Walter Roberson
am 28 Dez. 2022
w = @(k) randn(size(k)) ;
syms x1 x2
for k=1:1:100
if k==1
x1(k)=1;
x2(k)=1;
end
x1(k+1)=x1(k)+(exp(-k))*x2(k)+w(k);
x2(k+1)=0.95*x2(k);
plot(k,x1(k),'.'); hold on
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

