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
 Problem with xatymax, INTERNAL.c
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

klunz

Germany
Posts

Posted - 07/30/2009 :  04:13:44 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8G SR4
Operating System: Win Xp

Hello Everyone,

I'm currently having a strange problem with the funktion xatymax.
I've used it before and it worked flawlessly. With my newest (fairly small) programm I get the following message in the command-window:
@@@@@PLEASE REPORT THIS ERROR Class member not linked to dll

allgemeiner Ausführungsfehler
No Error string table entry for ID =  -28673
#Command Error!

and Code-Builder says
C:\Programme\OriginLab\Origin8\OriginC\system\INTERNAL.C(317) :Laufzeitfehler in Origin C Funktion, allgemeiner Ausführungsfehler

and points to this section in INTERNAL.c
// returns x value corresponding to maximum in y value
double xatymax(Curve &cc)
{
	Curve cc2(cc);
	Dataset dsX;
	cc2.AttachX(dsX);
	int iMax;
	ocmath_d_sum(cc2, cc2.GetSize(), NULL, NULL, NULL, &iMax);
	return dsX[iMax];
}
///End REWRITE_XATYMIN_AND_XATYMAX


My snippet of code, calling the function is the following:
Curve kurveSignal(tabelleRechnung,0,1);
//Curve kurveFaltung (tabelleRechnung, 0,4);
double MaximumSignalZeit = xatymax(kurveSignal);
//double MaximumFaltungZeit = xatymax(kurveFaltung);

where tabelleRechnung is a simple Worksheet, the columns 0 and 1 definetly exist (I guess otherwise I would get compiler-errors anyway).

So I have no clue whats wrong. Maybe its because of the librarys I include:
#include <origin.h>
#include <GetNBox.h>

#include <..\OriginLab\fft.h>
#include <fft_utils.h>

#include <OC_nag8.h>
#include <NAG8\nag.h>
#include <NAG8\nagc06.h>


Thanks in advance for your help, and a nice day to everyone
Tobi

Iris_Bai

China
Posts

Posted - 07/31/2009 :  05:42:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

From your codes and included header files, I cannot find out why xatymax cause runtime error in your running backgroud.
Could you activate the same worksheet and run the following codes to see if also get runtime error?

void testCurve()
{
	Worksheet tabelleRechnung = Project.ActiveLayer();
	Curve kurveSignal(tabelleRechnung,0,1);
	double MaximumSignalZeit = xatymax(kurveSignal);
	out_double("", MaximumSignalZeit);	
}


If not get runtime error and print out correct result, please check other places.


Iris
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