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

lillt91

Germany
14 Posts

Posted - 03/06/2018 :  08:04:48 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): origin2018
Operating System: win8

is there a chance to loop this script? i tried it like this:
stelle=10;
ncols=wks.ncols;

for(bb=1; bb<=29; bb++)
{
int start=(ncols-1)*(stelle/160)-5;
int ende=(ncols-1)*(stelle/160)+5;
n=2
for(ii=start; ii<=ende; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[<new>]<new>!(n);
}
stelle+5;
}


but it didnt work...

main script:
quote:
ncols=wks.ncols;

int s1s=(ncols-1)*(10/160)-5; int s1e=(ncols-1)*(10/160)+5; n=2;
for(ii=s1s; ii<=s1e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A1000]"Sheet1"!wcol($(n));
n++;
}

int s2s=(ncols-1)*(15/160)-5; int s2e=(ncols-1)*(15/160)+5; n=2;
for(ii=s2s; ii<=s2e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A1500]"Sheet1"!wcol($(n));
n++;
}

int s3s=(ncols-1)*(20/160)-5; int s3e=(ncols-1)*(20/160)+5; n=2;
for(ii=s3s; ii<=s3e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A2000]"Sheet1"!wcol($(n));
n++;
}

int s4s=(ncols-1)*(25/160)-5; int s4e=(ncols-1)*(25/160)+5; n=2;
for(ii=s4s; ii<=s4e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A2500]"Sheet1"!wcol($(n));
n++;
}

int s5s=(ncols-1)*(30/160)-5; int s5e=(ncols-1)*(30/160)+5; n=2;
for(ii=s5s; ii<=s5e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A3000]"Sheet1"!wcol($(n));
n++;
}

int s6s=(ncols-1)*(35/160)-5; int s6e=(ncols-1)*(35/160)+5; n=2;
for(ii=s6s; ii<=s6e; ii++)
{
interp1xy iy:=[Book1]"Raw"!wcol($(ii)) method:=spline npts:=154 oy:=[A3500]"Sheet1"!wcol($(n));
n++;
}

Chris D

428 Posts

Posted - 03/06/2018 :  4:11:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Can you explain what this calculation is- what you are trying to achieve:

int s1s=(ncols-1)*(10/160)-5;


Before I can address further I'm trying to just understand what part.

Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

lillt91

Germany
14 Posts

Posted - 03/07/2018 :  04:29:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I have a record with 1,900 lines to analyze. The data comes from a 160 mm sheet metal plate. I have divided the sheet metal into 5 mm increments and now I want to analyze the data individually for each position (10 mm, 15 mm, 20 mm etc.). For example, OriginPro should interpolate the data at point 10 mm to increase the amount of data. It should insert the interpolated points into a new workbook so that I can look at them in isolation.

In order to cover and examine the area around 10 mm, I would like to look at 5 profiles before the area 10 mm and 5 profiles after the area 10 mm in order to obtain a higher meaningfulness.

Edited by - lillt91 on 03/07/2018 04:30:59 AM
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