Why is my plot shaking but not plotting the noise?
Show older comments
clear;
clc;
for x = 0:(pi/200):(2*pi)
e = rand;
y = x*sin(x)+(0.5*e);
x_star = [0:(pi/200):(2*pi)].';
y_star = x_star.*sin(x_star)+0.5*e;
figure(1)
plot(x_star,y_star)
grid on
title('Hw1');
xlabel('x');
ylabel('f(x)');
end

Accepted Answer
More Answers (0)
Categories
Find more on Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
