-2

强度图

我有在上图中标记为粉红色的强度点,这些强度点存储在变量中并给出为

intensity_info =[ 35.9349
   46.4465
   46.4790
   45.7496
   44.7496
   43.4790
   42.5430
   41.4351
   40.1829
   37.4114
   33.2724
   29.5447
   26.8373
   24.8171
   24.2724
   24.2487
   23.5228
   23.5228
   24.2048
   23.7057
   22.5228
   22.0000
   21.5210
   20.7294
   20.5430
   20.2504
   20.2943
   21.0219
   22.0000
   23.1096
   25.2961
   29.3364
   33.4351
   37.4991
   40.8904
   43.2706
   44.9798
   47.4553
   48.9324
   48.6855
   48.5210
   47.9781
   47.2285
   45.5342
   34.2310 ];

我也有 A、B 和 C 点的信息,其计算方式为:

  [maxtab, mintab] = peakdet(intensity_info, 1); % maxtab has A and B information and 
                                                  % mintab has C information

peakdet.m matlab 代码可以在这里找到:(http://www.billauer.co.il/peakdet.html)。我想计算 D 点(强度值的视觉增加,即如果我们从 A 点下来强度降低但在 D 点强度略有增加)。从下图中可以看出,C 点也可以位于 D 点的左侧,在这种情况下,如果我们从 B 点下降,强度会降低,而 D 点的强度会略有增加。下图的强度值如下所示:

intensity_info =[29.3424
   39.4847
   43.7934
   47.4333
   49.9123
   51.4772
   52.1189
   51.6601
   48.8904
   45.0000
   40.9561
   36.5868
   32.5904
   31.0439
   29.9982
   27.9579
   26.6965
   26.7312
   28.5631
   29.3912
   29.7496
   29.7715
   29.7294
   30.2706
   30.1847
   29.7715
   29.2943
   29.5667
   31.0877
   33.5228
   36.7496
   39.7496
   42.5009
   45.7934
   49.1847
   52.2048
   53.9123
   54.7276
   54.9781
   55.0000
   54.9781
   54.7276
   53.9342
   51.4246
   38.2512];

A、B、C 点的计算方法同上。

在这些情况下如何计算 D 点?

强度图 2,C 位于 D 点左侧

4

3 回答 3

0

我不是 MATLAB 识字,但如果“选项卡”是子表,那么也许你可以操纵它们来创建其他子表......就像(我重复一遍,文盲)

left_of_graph = part of graph from A to C
right_of_graph = part of graph from C to B

left_delta = some fraction of the difference between A's y-value and C's y-value
right_delta = some fraction of the difference between C's y-value and B's y-value

[left_maxtab,left_mintab] = peakdet(left_of_graph,left_delta)
[right_maxtab,right_mintab] = peakdet(right_of_graph,right_delta)

确实有一些峰值分析的经验,所以我会说这将有助于解决问题,而不是回答问题。你可以找到所有你想要的峰,但这并不意味着这些数据值得仔细观察。噪音和不完美的分辨率是真实存在的。狩猎愉快!

PS您还可以扫描整个波段中高于两个邻居的所有点。保证不会错过任何“真实”最大值,而是给你更多的“虚假”最大值(尽管你的数据看起来很平滑!)。

于 2013-02-08T18:45:30.847 回答
0

您正在寻找的解决方案是一种基于迭代的数值方法,在您的特定情况下,二分法是最适合的方法,因为其他方法(如统一顺序搜索)不会将间隔作为输入。这是二分法的实现:

    function [ a, b, L ] = Bisection( f, a, b, e, d )
%[a,b] is the interval for your local maxima; e is the error for the result and d is the step(dx).

L = b - a;
while(L > e)
  xa = ((a + b)/2) - d/2;
  xb = ((a + b)/2) + d/2;

  ya = subs(f,xa);
  yb = subs(f,xb);

  if(ya < yb) 
      a = xa;
  else
      b = xb;
  end
  L = b - a;    
end
end

之前的方法非常有效且易于使用,尽管还有其他更好的方法(在性能方面),例如斐波那契和黄金截面方法。

干杯。

于 2013-02-11T05:09:48.293 回答
0

我找到了替代解决方案。extrema.m 有助于在以上两个 garphs 中找到 D 点。extrema.m 可以从 ( http://www.mathworks.com/matlabcentral/fileexchange/12275-extrema-m-extrema2-m ) 下载,并以下列方式用于查找点 D:

 [ymax,imax,ymin,imin] = extrema(intensity_info);
 figure;plot(x,intensity_info,x(imax),ymax,'g.',x(imin),ymin,'r.');
于 2013-02-11T10:54:49.293 回答