Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I'm trying to do some curve fitting to surface data (X, Y, Z) using Minerr to fit measured data (Z) to a function of (X,Y), and under normal circumstances this works just fine. However, some of my data sets have a circular obscuration (approximately) in the middle so that there is no valid data in this region. I was hoping that if I set the data in this region to NaN, that the built-in MathCAD solver functions would simply ignore this data, but this doesn't seem to be the case.
My alternative is to "deconstruct" my matrices of X, Y, Z data into XYZ column vectors, remove the offending data points, perform the fit, put the offending data points back in, and then re-construct the mattrices from the column vectors.
Can anyone offer a better alternative?
My alternative is to "deconstruct" my matrices of X, Y, Z data into XYZ column vectors, remove the offending data points, perform the fit, put the offending data points back in, and then re-construct the mattrices from the column vectors.
Why do you need to put the offending data points back in?
There are many functions which can extract, remove or collect data based on a certain condition. A worksheet indicating the problem would greatly help.
Mike
You're right I don't need to put the offending points back in.
If you are using minerr the right way you should be constructing a matrix or vector of residuals (which you then minimize). When you do that, set the residuals for the offending points to zero. If that's not the way you are using minerr you had bettter post a worksheet.
Apr 20, 2011
Re: Can I get MathCAD to Ignore part of a data set?
If you are using minerr the right way you should be constructing a matrix or vector of residuals (which you then minimize). When you do that, set the residuals for the offending points to zero. If that's not the way you are using minerr you had bettter post a worksheet.
Thanks-your sample file addresses exactly the issue, and illustrates how to strucuture a solution.