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
 Integration following an arithmetic operation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ds755

57 Posts

Posted - 04/13/2018 :  11:26:03 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Origin 2018 SR1, Windows 8.1

Hello,

I am at my wit's end trying to understand how to make an integration command execute after a division command.

To specify, I divide eight columns in pairs and the result of the division is stored in four columns. These four columns then need to be integrated. The problem is that the integration commands are always executed before the divisions. Could you please tell me how to resolve this issue (i.e. change the order of evaluation of statements)?

I can paste my code if it helps.

Edited by - ds755 on 04/13/2018 11:28:47 AM

nick_n

Finland
125 Posts

Posted - 04/14/2018 :  3:13:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
>>I can paste my code if it helps.
Yes, please. Also, it would be better to have some sort of an example. BR,

Nikolay
Go to Top of Page

ds755

57 Posts

Posted - 05/07/2018 :  05:18:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello and sorry for the delayed response.

The problem was that I had placed the arithmetic command (division) at the function cell of each column, using the col(B)[O] command. The placement was done when col(A) had nothing to divide.

I thought that the recalculation would happen automatically when col(A) was updated. In fact, it happened at the end of the script, after the integration, which caused the integration to fail.

When I moved the col(B)[O] commands after col(A) had its intended values, then the division happened when it was supposed to, and the integration did not fail.
Go to Top of Page

nick_n

Finland
125 Posts

Posted - 05/07/2018 :  4:42:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thus, you have solved your problem? Is there any special reason to use column label "O" (col()[O])?
Probably, you can find more easy to use direct calculation in your script, like col(C)=col(A)/col(B).
In this case you wouldn't meet any problems with execution order.
BR,

Nikolay
Go to Top of Page

ds755

57 Posts

Posted - 05/10/2018 :  04:51:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Nikolay.

Yes, the problem is solved now. Thanks for your feedback.

I used the label "O" because I wanted to enable the automatic recalculation in that column.
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