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
 LabTalk Forum
 Even spacing fluctuation

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
Khosrove Posted - 12/02/2015 : 11:07:44 AM
Is there a way to get the even spacing fluctuation value when converting from worksheet to matrix? I understand that it won't go through with the conversion if the set tolerance is lower than the even spacing fluctuation, but I would like to know the value of fluctuation if it is lower than the tolerance limit and does go through.
4   L A T E S T    R E P L I E S    (Newest First)
Khosrove Posted - 12/04/2015 : 03:29:59 AM
Thank you! I haven't tried this yet, but this is what I was looking for. Never would have found it on my own, thanks!
SeanMao Posted - 12/03/2015 : 9:55:30 PM
Hi,

I checked into the code of our w2m X function and extract the code that is used to calculate the fluctuation percentage.

You may need to define a function as I show below to obtain this value separately:


double fluc(vector& vxy, double dTolPerc)
{
	vector vdiff;
	double dFluctPerc;
	vxy.Difference(vdiff);
	double min, max;
	vdiff.GetMinMax(min, max);
	double dMean;
	vdiff.Sum(dMean);
	dMean = dMean/(1.0*vdiff.GetSize());
	dFluctPerc = round(fabs(max - dMean)/fabs(dMean)*100, 2);
	return dFluctPerc;
}


To use it, suppose col(A) is your Y values col, you can run:
flucpercent = fluc(col(A),5) // where 5 is the tolerance you input

Regards!

Sean

OriginLab Tech.
Khosrove Posted - 12/03/2015 : 1:11:55 PM
SeanMao,

thank you for your reply. However that isn't exactly what I meant.
When converting a worksheet to matrix using direct conversion, there is an option to set Even Spacing Tolerance(%)
If the set tolerance is lower then a message pops up saying for example
"Your X data are not evenly spaced, it has fluctuation of 12.35%.
Please try changing the tolerance setting."


I would like to obtain the fluctuation percentage even when there is no error message and the worksheet is converted to a matrix without problems (when the set percentage is higher that the fluctuation percentage). Hope this clears up my problem.
SeanMao Posted - 12/02/2015 : 10:23:24 PM
Hi,

I am not sure what is the fluctuation value you mentioned. You may find some reference about the criteria we used in gridding for converting worksheet to matrix:

http://www.originlab.com/doc/Origin-Help/XYZGridding-Dialog

Regards!

Sean

OriginLab Tech.

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