Author |
Topic  |
|
kumarb
India
7 Posts |
Posted - 03/18/2011 : 06:49:15 AM
|
I would like to set the column formula using labtalk script.Kindly let me know the solution. Regards, Kumar.B
Kumar B |
|
Penn
China
644 Posts |
Posted - 03/20/2011 : 11:49:29 PM
|
Hi Kumar.B,
You can use Set Column Values dialog. For example, there is a formula y=x*2+3, where x is stored in column A, and then I want to calculate y and store it in column B. Just right-click on column B and then select Set Column Values from the context menu, then put the expression "col(a)*2+3" in the text box of the pop-up dialog.
Penn |
 |
|
kumarb
India
7 Posts |
Posted - 03/21/2011 : 12:44:02 AM
|
quote: Originally posted by Penn
Hi Kumar.B,
You can use Set Column Values dialog. For example, there is a formula y=x*2+3, where x is stored in column A, and then I want to calculate y and store it in column B. Just right-click on column B and then select Set Column Values from the context menu, then put the expression "col(a)*2+3" in the text box of the pop-up dialog.
Penn
------------------------------------------------------------ Hi Penn, Thanks for the answer.But my question is how to do that using Labtalk script instead of manual selection method.
Kumar B |
 |
|
Penn
China
644 Posts |
Posted - 03/21/2011 : 02:20:22 AM
|
Hi Kumar.B,
Do you mean to set something like "col(a)*2+3" into the text box of the Set Column Values dialog? Or just want to run some LabTalk script to set column values according to formula?
If the former case, I am afraid you cannot do that in Origin 7.5. However, you can use the csetvalue X-Function to do that with the latest version, Origin 8.5. You can run the script "csetvalue col:=col(b) formula:=col(a)*2+3" in Script Window.
If the latter case, just run "col(b)=col(a)*2+3" in Script Window.
Penn |
Edited by - Penn on 03/21/2011 02:21:18 AM |
 |
|
|
Topic  |
|
|
|