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
 Set column formula using Labtalk (origin 7.5)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kumarb

India
7 Posts

Posted - 03/18/2011 :  06:49:15 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

kumarb

India
7 Posts

Posted - 03/21/2011 :  12:44:02 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

Posted - 03/21/2011 :  02:20:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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