Extracting data from two matrices

조회 수: 11 (최근 30일)
Faisal Memon
Faisal Memon 2014년 12월 29일
댓글: Image Analyst 2015년 1월 15일
I have two matrices: X is 100 by 1e5, complex double and Y is 1 by 1e5. For each row, X matrix contains either one peak value or two peak values.
Based on the index(indices) of the (these) peak value(s), I have to know the corresponding value of Y matrix. But it is all random i.e. the peak values are different from each other. Also the X matrix contains complex values.
Please help.
Faisal
  댓글 수: 3
Faisal Memon
Faisal Memon 2014년 12월 29일
Kindly see the figure. It is zoom in. The graph has 2 peaks, one is centered around zero, the other is at some value of X-axis. I need that value of x-axis where the second peak is located. Please help
Faisal Memon
Faisal Memon 2014년 12월 29일
the fig 2 is same as fig 1 but with less zoom.

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

채택된 답변

Image Analyst
Image Analyst 2014년 12월 29일
if you "need that value of x-axis where the second peak is located." then try this, where you start looking for the max starting from the half way point (just the right half of the signal).
middleElement = floor(length(X)/2);
[maxValue, index] = max(X(middleElement:end));
yIndexOfMax = index + middleElement;
yAtMax = Y(yIndexOfMax);
Note that X is your signal (normally what people call Y), and your Y is what people normally call x - not sure why you did it that way, but I followed your unconvential notation.
You might need to look at the magnitude, real part, or imaginary part of X instead of complex values because the max is not defined for a fully complex number.
  댓글 수: 9
Faisal Memon
Faisal Memon 2015년 1월 15일
Dear @Image Analyst
I need your help in ifft problem. I have sent you an email too.
Faisal
Image Analyst
Image Analyst 2015년 1월 15일
I don't read the email associated with this account. Post a new question and someone will answer.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by