Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
thebigpeeler
Posted - 06/26/2013 : 09:12:32 AM Hi guys,
So basically im writing some code using Origin C to speed up some data analysis. I have my Data in Time(X) and Amplitude in Volts (Y), using origin pro id usually go to Analysis->Signal Processing->FFT->FFT
Then id select the Amplitude column as the input, tick shift and unwrap phase,normalize the power to MSA and plot Amplitude/Phase.
Is there any way to do this in code? I've successfully managed to create new worksheets automatically and I understand how to move data from one sheet to another, but have no idea how to perform FFT like I would normally do manually, but in code. All i need is 3 columns as the output; Freq, Amplitude and Phase.
Thanks in advance guys
Oli
:D
7 L A T E S T R E P L I E S (Newest First)
thebigpeeler
Posted - 06/28/2013 : 05:10:13 AM thats even more awesome haha cheers man solved!
:D
Sam Fang
Posted - 06/27/2013 : 11:45:02 PMix is a complex vector, not a string. There is a bug for SetArg function with vector.
You can also call X-Function using LabTalk in OriginC.
BOOL rc;
rc = LT_execute("fft1 ix:=col(1);");
Sam OriginLab Technical Services
thebigpeeler
Posted - 06/27/2013 : 06:56:32 AM also, all the other arguments work fine, its only the ix input argument i cant seem to get right, is the following syntax correct?
[Book1]myData!3
:D
thebigpeeler
Posted - 06/27/2013 : 06:14:11 AM if i remove the argument completely, it works, whats going wrong?
:D
thebigpeeler
Posted - 06/27/2013 : 05:41:05 AM Cheers man, im trying to get fft1 to work but coming up with the foillowing error when i execute my code:
fft1:X-Function failed to execute! Internal error code: -898, -45
----------------------------------------- Origin C also provides a basic function:
int fft_fft_real( int iSize, double * vSig, FFT_SIGN iSign = FFT_FORWARD )
You have to use other functions for derived results.
Sam OriginLab Technical Services
thebigpeeler
Posted - 06/26/2013 : 09:33:17 AM or is there any way of calling fft1 with its options from the Origin c code? that would be perfect, especially if i can extract the data from the call