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
 Origin 8 - NAG function or variable not found
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

klawitter

USA
Posts

Posted - 01/03/2008 :  3:51:25 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): v8.0725
Operating System: Windows XP Professional

Line of code breaks when upgrading Origin from v7.5885 to v8.0725

status = nag_fft_real(iN,vX); //call NAG function


compiling...
StackedCharts.C
C:\Project\StackedCharts.C(948) :Error, function or variable nag_fft_real not found
C:\Project\StackedCharts.C(948) :Error, general compile error

--------------

I have searched the ..\OriginC\System folder for any files containing the function name 'nag_fft_real', and found that Origin 7.5 contains the function in C:\Program Files\OriginLab\Origin75\OriginC\system\NAG\OCN_c06.h

int nag_fft_real(
int n, //the number of data values.
double x[] // Input: contained in x[j], for j = 0, 1, . . . , n - 1. Output: the discrete Fourier transform stored in Hermitian form.
); // Given a sequence of n real data values xj, for j = 0, 1, . . . , n - 1, this function calculates their discrete Fourier transform.


Origin 8 does not contain the function in any of the files. The only reference to the function is in C:\Program Files\OriginLab\Origin8\OriginC\System\NAG8\nag_names.h

#define  nag_fft_real                        c06eac  /* Mark 1 */


--------------

Is there any reason why the 'nag_fft_real' function is not included in Origin version 8? Is there a way to get this working in version 8? Any and all help would be appreciated.

Deanna

China
Posts

Posted - 01/03/2008 :  10:26:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi. Did you including the needed header file, OC_nag8.h, in your c file?

#include <OC_nag8.h>

After including this header file, you should be able to use nag_fft_real() function.

You can search for "Accessing NAG Functions" in the programming help file for more informations on how to access NAG functions.

By the way, I suggest upgrading your Origin 8 to SR1 because some bugs have been fixed in SR1.


Deanna
OriginLab Technical Services
Go to Top of Page

Echo_Chu

China
Posts

Posted - 01/04/2008 :  01:40:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
In 80 we provide whole NAG Mark7 Libary. So nag_fft_real() should be used in NAG way. Sample code are as following


//#include <OC_nag8.h> //include 80 NAG header file
void test_fft()
{
int success ;
//Attach two Datasets to these 2 columns
Dataset xx("book1",0);
vector x = xx;
int n = x.GetSize();
//success = nag_fft_real(n, x); //this line should be updated as following
NagError fail;
nag_fft_real(n, x, &fail);
success = fail.code;
}



But we realize that it is a problem that 75 codes can not be used directly in 80. We are considering to also bring back 75 way for NAG functions.

Edited by - Echo_Chu on 01/04/2008 01:46:09 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