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
 LabTalk Forum
 Script to detect changes in the value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Bolu123

Poland
1 Posts

Posted - 12/02/2010 :  5:48:39 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Could you please provide me a sample script:
- Detects increasing values in one column and copies the data (all rows) into a new worksheet
- Then the decline, and again the script detects this event and he just copies the data into a new worksheet
- Then again detects the change - the values are rising again - the script detects and stores the data in a new work sheet
- And so on
- Script ends up as run out of data
- It is important to point MAX and / or MIN naeay to anyone on the worksheet, eg:
- Worksheet1: contains values for some columns: 1 5 6 10 (value rise)
- Worksheet2: contains values from the same column: 10 8 7 4 2 (decreasing value) - those with a value of 10 are duplicated
- Worksheet3: contains values from the same column: 2 5 8 9 12 (value rise) - those with a value of 2 are duplicated, etc.

Thus, your script to work like the "Extract Worksheet Data" with the code written by myself: a) for increasing values: (((col (TC) [i]> = 148) & & (col (TC) [i] <= 800 )) & & col (TC) [i] <= col (TC) [i +1 ])||((( col (TC) [i]> = 148) & & (col (TC) [i] <= 800) ) & & col (TC) [i-1] <= col (TC) [i])
b) for diluting the value: (((col (TC) [i]> = 148) & & (col (TC) [i] <= 800)) & & col (TC) [i]> = col (TC) [i + 1 ])||((( col (TC) [i]> = 148) & & (col (TC) [i] <= 800)) & & col (TC) [i-1]> = col (TC) [i ])

Someone help me? I'll be very grateful.

larry_lan

China
Posts

Posted - 12/06/2010 :  10:00:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Maybe you can request a Consulting Services.

Thanks
Larry
Go to Top of Page

greg

USA
1379 Posts

Posted - 12/14/2010 :  10:46:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is how to put your formula into the wxt X-Function version of the Worksheet Extract dialog:

string str$ = [%H]$(page.active);

wxt iw:=wks$ test:="(((col(TC)[i] >= 148)&&(col(TC)[i] <= 800 ))&&col(TC)[i] <= col(TC)[i+1])||(((col(TC)[i] >= 148)&&(col(TC)[i] <= 800))&&col(TC)[i-1] <= col(TC)[i])" ow:=<new name:=Increase>;

wxt iw:=wks$ test:="(((col(TC)[i]>=148)&&(col(TC)[i]<=800))&&col(TC)[i]>=col(TC)[i+1])||(((col(TC)[i]>=148)&&(col(TC)[i]<=800))&&col(TC)[i-1]>=col(TC)[i])" ow:=<new name:=Decrease>;
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