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

burnie8223

United Kingdom
1 Posts

Posted - 12/04/2008 :  06:12:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I've been a user of originpro 7.5 for a while and we're currently changing to originpro 8.0

I used to use a script which can be seen below which is found at the following link

http://www.originlab.com/forum/topic.asp?TOPIC_ID=3381

get col(B) -e npt; // npt is the number of rows
nn=2*npt;
set %H -er nn; // double the number of rows
dwell=col(A)[2]-col(A)[1]; // dwell time
start=col(A)[1]; // first time value (row 1)
stop=start+dwell*(nn-1)); // last time value (row nn)
col(A)=data(start,stop,dwell); // fill in time column (1st half will be the same as before)
tmp=data(1,nn); // create a temporary dataset with nn rows
tmp=0; // set all values to zero
copy -b 1 col(B) tmp -b 1 -e npt; // copy existing Y values to tmp
col(B)=tmp; // copy tmp to col(B) (1st half will be the same, 2nd half will be zeros)
del tmp; // delete tmp

Basically its used to zero pad my data for FFT

It works fine in originpro 7.5

but in originpro 8.0 rather than zeros I get column numbers.

can anyone tell me what to change in order for it to work in originpro 8.0

thanks

Andrew

fisher_zhang

China
Posts

Posted - 12/05/2008 :  01:14:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, Andrew


The sixth line
stop=start+dwell*(nn-1)); // last time value (row nn)

should be:
stop=start+dwell*(nn-1); // last time value (row nn)


Thanks
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