필터 지우기
필터 지우기

hello guys, I have a data like this and I want to set a upper and lower threshold values(different) for both the subplots seperately, can anyone help me with the code? Thanks in advance!!

조회 수: 1 (최근 30일)
  댓글 수: 3
Image Analyst
Image Analyst 2017년 3월 17일
Perhaps do you mean y limits instead of threshold? Like how you'd set with the ylim() function?
krishna kireeti
krishna kireeti 2017년 3월 18일
yeah for both the channels I need only the signal that is greater than 0.0005(y-axis limit) in this case in both the subplots.

댓글을 달려면 로그인하십시오.

답변 (1개)

Star Strider
Star Strider 2017년 3월 18일
The easiest way to define the y-axis limit for each subplot:
YL1 = get(subplot(2,1,1),'YLim')
set(subplot(2,1,1), 'YLim',[5E-4 max(YL1)])
YL2 = get(subplot(2,1,2),'YLim')
set(subplot(2,1,2), 'YLim',[5E-4 max(YL2)])
These go after the subplot calls in your code.
This looks a bit redundant, but guarantees that the correct value for the maximum is set in each subplot.

Community Treasure Hunt

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

Start Hunting!

Translated by