Origin Ver. and Service Release (Select Help-->About Origin): 9.0 Operating System: Windows 7
I'm new to Origin and would like some help on this task.
I have a column of numbers Col(A), mostly 1s, a few 10s and 0s. The 10s and 0s are flags. I want to set numbers in Col(B) based on these flags. If Col(A)[1] is 10, then I want to set Col(B)[1] through Col(B)[250] to be 1. If Col(A)[1000] is 0, then I want to set Col(B)[1000] through Col(B)[1500] to 2. The rest will be 0.
How do I achieve setting the new column value for a certain length either using "Set Column Value" or other scripts?
You have asked for two non-exclusive conditions each with separate ranges so Set Column Values would need to be used three times. The first would fill the full range of column B with zero. (From = 1, To = whatever needed) Next, for rows 1 to 250 you could use the expression col(A)[1]==10?1:0 Finally, for rows 1000 to 1500 you could use the expression col(A)[1000]==0?2:0
Of course LabTalk could be used for a programmed solution.