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
 What is the new convert_regular_xyz_to_matrix
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bnholland

Ireland
Posts

Posted - 04/09/2008 :  12:36:34 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 8 SR1
Operating System: Windows XP

I have just upgraded to origin 8 and when trying to compile an old Origin C file from version 7.5 the following error occurred
"Error, function or variable convert_regular_xyz_to_matrix not found"
It seems that this is because the function no longer exists in this version. Is that correct? If so does anyone know what is the best way to convert the equivalent with the latest version of Origin?

Cheers
Brendan

Echo_Chu

China
Posts

Posted - 04/15/2008 :  04:29:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use ocmath_convert_regular_xyz_to_matrix as an replacement

Sample Code are as following
 
#include <wks2mat.h>
void ocmath_convert_regular_xyz_to_matrix_ex1()
{
double dPrecision = 1.0e-8;
UINT n = 9;
double a[]={1,1,1,2,2,2,3,3,3};
double b[]={1,2,3,1,2,3,1,2,3};
double c[]={5,3,7,3,6,5,0,4,3};
double mat[100];

double Xmin, Ymin, Xstep, Ystep, Xmax, Ymax;

int nRet = ocmath_xyz_examine_data(n, a, b, c, dPrecision, &n, &Xmin,
&Xstep, &Xmax, &Ymin, &Ystep, &Ymax, true);

if(nRet == 0)
{
printf("X: %g\t%g\t%g\n ", Xmin, Xstep, Xmax);
printf("Y: %g\t%g\t%g\n ", Ymin, Ystep, Ymax);

int iX, iY;
iX = Xstep > 0 ? (int)((Xmax - Xmin) / Xstep + 0.5) + 1 : 1;
iY = Ystep > 0 ? (int)((Ymax - Ymin) / Ystep + 0.5) + 1 : 1;

nRet = ocmath_convert_regular_xyz_to_matrix(n, a, b, c,
mat, Xmin, Xstep, iX, Ymin, Ystep, iY);

for(int i=0; i<iY; i++)
{
for(int j=0; j<iX; j++)
printf("%g\t",mat[i*iX + j]);
printf("\n");
}
}
}

Go to Top of Page

JaapVerheggen

Ireland
Posts

Posted - 01/16/2009 :  09:06:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OriginPro Version: 8 SR2
OS: Win XP

I have the same problem with convert_regular_xyz_to_matrix.
However, ocmath_convert_regular_xyz_to_matrix doesn't seem to work either. It is not even listed in my help-file.

Is there another workaround?

---///---

Edited by - JaapVerheggen on 01/16/2009 09:06:46 AM
Go to Top of Page

Echo_Chu

China
Posts

Posted - 01/22/2009 :  10:30:48 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks for your suggestion. XYZ gridding functions will be added Origin C CHM in our next SR, SR5.

You can also refer to this wiki page for the help of ocmath_convert_regular_xyz_to_matrix

http://ocwiki.originlab.com/index.php?title=OriginC:Ocmath_convert_regular_xyz_to_matrix_%28global_function%29

Echo
OriginLab Corp
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