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!