| T O P I C R E V I E W |
| MarkusSause |
Posted - 03/20/2008 : 05:54:01 AM Hello Anybody!
Does anyone know how to use the function stft_real() in Origin 8.0 ? I'm struggling with an compiler error:
Linking... D:\...\CalculateWaveletTransform.c(373) :Fehler, Die Funktion stft_real@IAAAAAAALAAABAAALAAABAAALAAAAAAAIAAAAAAAIAAAAAAALAAAEAAALAAAAAAALAAAAAAA wurde aufgerufen. Während des Linkens konnte der Funktionskörper aber nicht gefunden werden. Linking Failed!
(My own) Translation: Linking... D:\...\CalculateWaveletTransform.c(373) :Error, Function stft_real@IAAAAAAALAAABAAALAAABAAALAAAAAAAIAAAAAAAIAAAAAAALAAAEAAALAAAAAAALAAAAAAA was called. Function body could not be found during linking. Linking Failed!
Anyone who had an similar error?
BTW - rest of my code:
//Worksheets Worksheet wks("Waveforms"); Worksheet wksWindow("Wavelet10MSPS"); //Datasets Dataset dsTime(wks, 0); Dataset dsSig(wks, 1); Dataset dsWin(wksWindow,1);
vector vecSig; vector vecWin; vecSig = dsSig; vecWin = dsWin; // Declare matrix for storing short term fft results Matrix matSTFT("Matrix1"); // Clear matrix of any previous computations matSTFT = 0; int nOverlap = 400; int nFFTPts = 1000; double dSmplIntv = 0.0000001; double dScaleTime = 0.0004; double dScaleFreq = 1000000;
int iRet = stft_real(vecSig, vecWin, dSmplIntv, nOverlap, nFFTPts , matSTFT, dScaleTime, dScaleFreq);
Help  |
| 3 L A T E S T R E P L I E S (Newest First) |
| MarkusSause |
Posted - 03/25/2008 : 08:22:51 AM OK. Now I've got a more detailed view.
1) I agree - it's not necessary to set nFFTPts to the power of 2. But I cannot see any limitation to vecWin length. I've tried several values 1000 - 8192 all being significantly larger then vecWin length, which is 50 in my example?
2) The error is the result of a missing compilation. The problem was solved (implicitly) by first using the standard stft-fuction available in origin, which (perhaps) also needs fftEx_utils.c. Afterwards I could use stft_real() in my source code like mentioned above.
Today I started all over again with the same linker error. Including fftEx_utils.c and compiling the function indeed solved the problem. |
| Deanna |
Posted - 03/23/2008 : 10:09:07 PM Hi MarkusSause,
It is not necessary to set nFFTPts to the power of 2. It can be any positive integer that is less than the length of vecWin.
I doubt the error that you met during the compiling was due to some necessary files (maybe \OriginLab\fftEx_utils.c) were not compiled yet.
Deanna OriginLab Technical Services |
| MarkusSause |
Posted - 03/20/2008 : 12:55:45 PM Got the answer on my own:
The integer value nFFTPts has to be to the power of 2, like in the Analysis example.
This means, the values of 256, 512, 1024, 2048, 4096, 8192, ... are allowed.
|
|
|