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
 LabTalk Forum
 FFT on a series of data sets
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

espenhjo

Norway
20 Posts

Posted - 02/10/2004 :  06:39:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi all!
I need to do an FFT on a series of datasets, all having the same structure. For this have I tried to use the LabTalk script in the help file. The thing is that when I use this I don't get the correct FFT as when I select the FFT manually from the analysis menu in Origin. I use exactly the same parameters manually as in this script:

loop (i,1,9) {
fft.reset();
fft.forward = 1;
fft.forward.timeData$ = ekko00$(i)_A;
fft.forward.tdelta = 2e-6;
fft.forward.realData$ = ekko00$(i)_B;
fft.forward.imagData$ = ekko00$(i)_C
window -t W fft FFT00$(i)$;
fft.output.samplingdata$ = FFT00$(i)_Freq;
fft.output.realdata$ = FFT00$(i)_Real;
fft.output.imagdata$ = FFT00$(i)_Imag;
fft.output.ampdata$ = FFT00$(i)_r;
fft.output.phasedata$ = FFT00$(i)_Phi;
fft.output.powerdata$ = FFT00$(i)_Power;
fft.start = 1;
fft.real = 1;
fft.normalize = 1;
fft.shifted = 1;
fft.windowing = 1;
fft.spectrum = 1;
fft.unwrap = 1;
fft.convention = 1;
fft.chkres();
fft.forward();
window -t P fftplot FFT00$(i)g;
}

Any idea what could be wrong?

Regards,
Espen

Mike Buess

USA
3037 Posts

Posted - 02/10/2004 :  08:14:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Espen,

Although the LabTalk FFT object works fine I have always found it to be much more complicated than is necessary for a simple FFT. If you're using Origin 7.0 or later I strongly suggest that you use the OriginC FFT function instead. But the only thing that I see wrong with your script is that fft.real should probably be zero since the input data are complex.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/10/2004 08:22:38 AM
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