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
 correcting partial range (spectrum)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cab0008

25 Posts

Posted - 04/19/2011 :  6:46:37 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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:

Sam Fang

291 Posts

Posted - 04/20/2011 :  06:08:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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