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 cell value automatically
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Francesco84

Italy
21 Posts

Posted - 12/04/2018 :  06:11:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. OriginPro 2018 (64bit) and Service Release 1
Operating System: Windows 10.

Good morning,

I have a worksheet with 2 columns (respectively X and Y).
I want to do the integral of the function and memorize the value of the area.
In the first cell of another column, I want to report the value of the area.

This is my code:

double integ_area;
integ1 iy:=[Book1]1!(A,B) area:=integ_area -r 1; // output in col(C)
wks.addcol(); // col D
csetvalue col:=col(D)[1] formula:="integ_area" recalculate:=1;

The problem is when I change a value of column B (and therefore the value of the area), because the value of column D is not updated.
And indeed, in column D there is no green lock at the top left.

How can I solve?

Thanks,
Francesco

yuki_wu

896 Posts

Posted - 12/04/2018 :  10:17:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Francesco,

You could try this:
integ1 -sl -r 1 iy:=[Book1]1!(A,B)  quantities.name:=0 quantities.i1:=0 quantities.i2:=0 quantities.x1:=0 quantities.x2:=0 quantities.y0:=0 quantities.x0:=0 quantities.fwhm:=0 rd:=[<input>]<input>;

Regards,
Yuki

OriginLab
Go to Top of Page

Francesco84

Italy
21 Posts

Posted - 12/05/2018 :  11:13:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks yuki_wu,
the code works perfectly.

I would have another small question.
I have to copy a column to another workbook. In the column there are some masked values and I do not want to copy them.

I used the function
colcopy -r 1 irng:= [Book1]1!1 orng:= [Book2]2!1 mask:= 0;

But I get the following error:
Error: can not find a (unique) variable corresponding to mask.

I do not understand where I'm wrong.

Francesco
Go to Top of Page

yuki_wu

896 Posts

Posted - 12/07/2018 :  9:54:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Francesco,

Copy Mask control is a new feature of Origin 2018b. It seems that you are still using an older version, right? Please upgrade your Origin to the latest version Origin 2019, then it should works fine.

Regards,
Yuki

OriginLab
Go to Top of Page

Francesco84

Italy
21 Posts

Posted - 12/17/2018 :  03:40:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks yuki_wu,

Francesco
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