Filtering out y values
4 次查看(过去 30 天)
显示 更早的评论
Hello all, I'm having some trouble with filtering out some data from the graph attached. Basically, I want to have the graph where it is just the wave through the range of 8-13. Anything below 8 and over 13 I want hidden in the graph. Thank you.
0 个评论
采纳的回答
更多回答(1 个)
Daniel
2023-6-20
If you're just looking for visual zoom, you can use the ylim command to set the y-limits on a graph. xlim works similarly for x-limits.
t = 0:0.01:10;
x = sin(2*pi*t) + randn(size(t)).^2+randn(size(t)).^2;
plot(t,x,'o')
title('Without ylim')
figure
plot(t,x,'o')
ylim([-1.5 5])
title('With ylim')
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!