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
 What is the new convert_regular_xyz_to_matrix

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
bnholland Posted - 04/09/2008 : 12:36:34 PM
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

3   L A T E S T    R E P L I E S    (Newest First)
Echo_Chu Posted - 01/22/2009 : 10:30:48 PM
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
JaapVerheggen Posted - 01/16/2009 : 09:06:05 AM
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?

---///---
Echo_Chu Posted - 04/15/2008 : 04:29:48 AM
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");
}
}
}


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