필터 지우기
필터 지우기

How can I separate a section of a graph with high values or Energy?

조회 수: 3 (최근 30일)
Kian Azami
Kian Azami 2017년 9월 8일
댓글: KSSV 2017년 9월 11일
In the image that I have attached to this question I would like to write a code to separate the values between the two data cursor from the rest of the data. How can I do that?
  댓글 수: 2
KSSV
KSSV 2017년 9월 8일
You have both x and y data to plot or you have plotted only y w.r.t indices.
Kian Azami
Kian Azami 2017년 9월 11일
편집: Kian Azami 2017년 9월 11일
I have only y with respect to the indices. However I can have the values of x which is not very important for me. The y is the intensity of each pixel color, and the x is the pixels positions. Therefore values of y with high intensity is the position where my image occurs and I want to separate it from the rest of the image.

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

답변 (1개)

KSSV
KSSV 2017년 9월 8일
If you have only y and plotting wrt indices then:
iwantx=416:1188;
iwant=y(I want);
If you have both x and y data.
iwantx=x(x>=416 & x<=1188) ;
iwanty=y(x>=416 & x<=1188) ;
  댓글 수: 4
Kian Azami
Kian Azami 2017년 9월 11일
This can be a good Idea! However sometimes there are noises that goes beyond that threshold but they are thin respect to the interested area. Maybe I can put a threshold and then I should put another condition with respect to the width?
KSSV
KSSV 2017년 9월 11일
One intensity threshold intensity is enough....you try out for one and check.

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

Community Treasure Hunt

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

Start Hunting!

Translated by