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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 FFT

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Qiang Posted - 07/22/2003 : 06:25:25 AM
Hi

I have been asked to extend the capabilities of the FFT funtion in OriginPro. The task involves a worksheet containing several sweeps of data. Each sweep contains several columns of data. The aim is that the user chooses/clicks 2/3 columns in the first sweep for example the first 2 columns out of 5 columns in each sweep and Origin is able to perform FFT to each of the first 2 columns for all the sweeps automatically without the user manually selecting the columns each time for each sweep.

At the moment I do not know whether OriginPro will allow me to do this. For example, is it possible to detect which columns the user clicked on? Also is it possible to incorporate the FFT function into a custom made program? It seems that maybe I could get the program to perform FFT to each sweep automatically but that will require the program to know the points above. Is it possible to obtain the source code of the FFT function that is already inside Origin?

This sounds quite a challenging task. The aim is to then tocollect all the data columns FFT outputs an put them together in another work sheet. I sincerely believe that OriginPro was not created to be pushed this far and the documentation is very limited. I'd be grateful if anyone could let me know either way whether this is feasible.

thanks

Qiang
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 07/23/2003 : 1:49:07 PM
Hi Qiang,

First of all, the things you mention here can be done in regular Origin as well - OriginPro is not needed.

You can detect selection using script or Origin C. The code pasted below shows how to get selection on worksheet using an Origin C funciton.

As for FFT, look up documentation on the LabTalk FFT object. This object can be programmed in LabTalk script to perform FFT, or it can be programmed directly in Origin C using statements such as:
LabTalk.FFT.Data$="data1_a"

Also, the NAG library offers FFT routines that can be directly called from Origin C functions.

Hope this information helps you. If you need more extensive help on prgramming etc. it may be best for you to get in touch with your local tech support office.

Easwar
OriginLab.


void test()
{
Worksheet wks = Project.ActiveLayer();
if(wks)
{
int c1, c2, r1, r2;
int seltype = wks.GetSelection(c1, c2, r1, r2);
if(WKS_SEL_NONE == seltype)
{
printf("Nothing was selected in the worksheet!\n");
return;
}
printf("Columns/Rows of selection: c1 = %d\tc2 = %d\tr1 = %d\tr2 = %d\n", c1, c2, r1, r2);
}
else
printf("Active page is not a worksheet!\n");
}



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000