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
 error message...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Bigprophete

France
20 Posts

Posted - 08/28/2015 :  03:10:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi !
I have a problem with my function (see below). When I run it, I have the follwoing error message... please help ^^

error message : LabTalk expression error: 31603

function:

function abscisse (double data, double range, double minValue) {
for( ii = 1 ; ii <= data ; ii++ )
{
Col(B)[ii]=minValue+(range/data)*(ii-1);
}
}
double data = %1; //First argument in function abscisse
double range = %2;
double minValue = %3;

Edited by - Bigprophete on 08/28/2015 03:17:19 AM

jasonzhao

China
262 Posts

Posted - 08/28/2015 :  05:33:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

What do you mean by writing:

double data = %1;

Does this sentence can replaced by:

double data = 0.01;


Best regards!
Jason
OriginLab Technical Service
Go to Top of Page

Bigprophete

France
20 Posts

Posted - 08/28/2015 :  10:50:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
double data=1%; It just a number.
After to run the script, I just want to write for example the code: abscisse (8912, 200, 250) and the result is in column B.
Go to Top of Page

jasonzhao

China
262 Posts

Posted - 08/31/2015 :  01:39:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

I run the script in the script window:

function abscisse (double data, double range, double minValue){
for( ii = 1 ; ii <= data ; ii++ )
{
Col(B)[ii]=minValue+(range/data)*(ii-1);
}
}
abscisse(8912,200,250);


The result is shown in column B:




Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 08/31/2015 05:14:40 AM
Go to Top of Page

Bigprophete

France
20 Posts

Posted - 08/31/2015 :  04:30:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have tried the code, it seems OK since no error message.
So thanks you very much Jason !

With best regards,

Mathias
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