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
 Increment in Col()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

marasneo

Poland
9 Posts

Posted - 04/30/2015 :  09:34:32 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
How can I increment each column Col? I want to multiply each value in each column by some factor - a variable taken from C script.


for (int aa=start_column; aa<liczba_kolumn; aa++ ){
double ss=50;
string labtalk_wstawka_2;
labtalk_wstawka_2.Format("Col(aa)=Col(aa)*%f;", ss);
wksb.LT_execute(labtalk_wstawka_2);
}

ZanHUNG

20 Posts

Posted - 05/03/2015 :  11:25:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
doc -e D {script}: "If a worksheet is active, execute for all datasets (columns) in the active worksheet".

To multiply each value in each column of the active worksheet by some factor, say, 50, the LabTalk script is:

doc -e D {%C *= 50.0;};


See the following for details:

http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects
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