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
 correcting partial range (spectrum)

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
cab0008 Posted - 04/19/2011 : 6:46:37 PM
Hello everyone, I was wondering if there was a better way to approach the problem of adding a certain value to part of a range.

Right now what I have in lab talk is:


vfind ix:=AbsIntCutx value:=900 ox:=IRcutoffPoint;
loop(n,0,end){
AbsIntCuty[$(IRCutoffPoint + n)]=AbsIntCuty[$(IRCutoffPoint + n)]-(AbsIntCuty[$(IRCutoffPoint)]-AbsIntCuty[$(IRCutoffPoint-1)]);
}


However, this is not working too well. My hope is to make this code do the following:
1 - look for the best row value to assign to a specified X value that I'm looking for
2- loop through the range of X values from that point to the end of the column
3 - take the Y values in this range and subtract off the difference in Y values from the last of the uncorrected range and the start of the corrected range.

Is there a better way to do this, or am I just missing some sort of syntax?

any help is appreciated.


Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
1   L A T E S T    R E P L I E S    (Newest First)
Sam Fang Posted - 04/20/2011 : 06:08:17 AM
You should use loop(n, 1, end), and correct AbsIntCuty[$(IRCutoffPoint)] at last. Because AbsIntCuty[$(IRCutoffPoint)] is used in your loop.

If there are more elements equal to 900 in AbsIntCutx, IRcutoffPoint can be a vector.

Sam
OriginLab Technical Services

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