The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 stft_real()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MarkusSause

Germany
Posts

Posted - 03/20/2008 :  05:54:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

MarkusSause

Germany
Posts

Posted - 03/20/2008 :  12:55:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Go to Top of Page

Deanna

China
Posts

Posted - 03/23/2008 :  10:09:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

MarkusSause

Germany
Posts

Posted - 03/25/2008 :  08:22:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000