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
 All Forums
 Origin Forum
 Origin Forum
 Zero padding

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
burnie8223 Posted - 12/04/2008 : 06:12:28 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
fisher_zhang Posted - 12/05/2008 : 01:14:28 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000