関数imsequence2_absmaxindex マニュアル

(The documentation of function imsequence2_absmaxindex)

Last Update: 2025/8/1


◆機能・用途(Purpose)

フーリエスペクトルの絶対値最大値を探し、対応するサンプル番号を返す。
Search the absolute maximum value of a Fourier spectrum, and return the index of the corresponding sample.


◆形式(Format)

#include <sequence/statistics.h>
inline int imsequence2_absmaxindex(struct imsequence2 seq)


◆引数(Arguments)

seq 絶対値最大値を探索したいフーリエスペクトルを表す構造体。
A structure to represent the Fourier spectrum for which the absolute maximum value is to be searched.


◆戻り値(Return value)

seq.valueの配列要素の絶対値最大値に対応する配列要素番号。
The index of the array component corresponding to the absolute maximum value of seq.value.


◆使用例(Example)

struct imsequence2 seq=get_imsequence2_memory(8,0.0,0.1);
seq.value[0]=1.0+2.0∗I;
seq.value[1]=3.0-4.0∗I;
seq.value[2]=-5.0+6.0∗I;
seq.value[3]=2.0+3.0∗I;
seq.value[4]=0.0;
seq.value[5]=-4.0+8.0∗I;
seq.value[6]=2.5-3.5∗I;
seq.value[7]=-1.5+2.5∗I;
int absmax_index=imsequence2_absmaxindex(seq);

この例ではabsmax_index=5となる。
In this example, the value of absmax_index is 5.


◆補足(Additional remarks)

この関数では探索範囲をナイキスト周波数以下に絞ることはしない。 というのはstruct imsequence2型構造体が表すデータを このマニュアルでは分かりやすさのために「フーリエスペクトル」と呼んでいるが 1変数の複素数値関数であれば何でも良く、例えば複素数の時系列データかもしれないからである。 ナイキスト周波数よりも高周波側の成分を含んだフーリエスペクトルを用いて ナイキスト周波数以下の範囲からピーク周波数を探索したい場合には 関数imsequence2_absmaxindex_limitfreqを用いる。
This function does not limit the search range to below the Nyquist frequency. This is because authough we use a word “Fourier spectrum” to represent data given by a struct imsequence2-type structure, this is just a simplification to promote the understanding; the actual data can be any 1-D complex-valued function, and thus can be, for example, a complex-valued time series data. To search the peak frequency of a Fourier spectrum that consists of frequencies higher than the Nyquiest frequency, use function imsequence2_absmaxindex_limitfreq.