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
 Origin Forum
 Select range using variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

loboludo

1 Posts

Posted - 04/18/2016 :  05:01:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
this might be a simple syntax question but I can't find any examples on this.

I know how to define a range based on certain x values eg
range rr=col(B)[x1.0:2.0];


what I would like is something like:

double x_1 = 1.0;
double delta_x = 1.0;
range rr=col(B)[xx_1:x_1+delta_x];

Is this possible?

meili_yang

103 Posts

Posted - 04/18/2016 :  12:06:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi loboludo,

This should work:

double x_1 = 1.0;
double delta_x = 1.0;
range rr=col(B)[x$(x_1):$(x_1+delta_x)];



Meili
OriginLab Tech Support
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