09-15-2010 11:58 AM
Hello all,
This may sound a very simple problem but I've been stuck for a short while. Basically I have a data set, see attached, and I want to cut out the peak and fit a polynomial to whats left.
I can see two ways to cut out the middle, by either replacing part of the array with NaNs (non-plottable) or simply deleting the offending section.
Neither seem to produce a new array which lend itself to fitting, I've attached my VI which can do both (needs a rewire to use either for fitting..).
Any ideas?
Regards,
David.
Solved! Go to Solution.
09-15-2010 12:15 PM
09-15-2010 12:16 PM
I think I got what you were looking for. Look at the example that I added and see if this does what you want.
09-16-2010 03:49 AM
Hi,
Thanks for your quick replies. However, aeastet, your VI isn't quite what I'm after.
I know its slightly annoying when people use screen grabs, but if you have a quick look at the one attched - from Origin 7- there I can use a data set with missing y-values to fit. This is what I want to do with my data after I have removed the peak - I'm pretty sure just deleting that part of the array is not the way to go so I've edited my VI accordingly.
After fitting I intend to use the fit as a background to get an absorbtion spectrum, then do further fitting (which I can do okay with another VI - I think!).
Is this any clearer?
Many thanks again.
D.
09-16-2010 09:48 AM - edited 09-16-2010 09:48 AM
Use "polynomial evaluation" using the found coefficients to generate the data for any x-values you possibly want. 😄
09-16-2010 10:09 AM - edited 09-16-2010 10:13 AM
@altenbach wrote:
Use "polynomial evaluation" using the found coefficients to generate the data for any x-values you possibly want. 😄
Try this.... (LV 2010)
09-16-2010 10:22 AM
That is, exactly, what i was after. Many, many thanks.
09-16-2010 10:47 AM
Here's a much better way. Simply set the weight of the undesired points to zero. 😄
(Modify as needed, there are many things still to improve.)