Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Can I get MathCAD to Ignore part of a data set?

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-20-2011
01:31 PM

04-20-2011
01:31 PM

Can I get MathCAD to Ignore part of a data set?

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?

Labels:

6 REPLIES 6

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-20-2011
01:49 PM

04-20-2011
01:49 PM

Re: Can I get MathCAD to Ignore part of a data set?

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

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-21-2011
11:47 AM

04-21-2011
11:47 AM

Re: Can I get MathCAD to Ignore part of a data set?

You're right I don't need to put the offending points back in.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-20-2011
02:07 PM

04-20-2011
02:07 PM

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.

Highlighted
##

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-21-2011
12:06 PM

04-21-2011
12:06 PM

Re: Can I get MathCAD to Ignore part of a data set?

Apr 20, 2011

**Re: Can I get MathCAD to Ignore part of a data set?**

Richard: I tried your suggestion. I get a vector of residuals, and I created a new vector after changing the residuals of the offending points, But then Minerr won't work using the constraint equation with the new vector on one side of the boolean.

I would post a worksheet, but I have been working this problem on a classified computer. If I have a chance I'll work up a file to post on my unclass machine.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-21-2011
02:52 PM

04-21-2011
02:52 PM

Re: Can I get MathCAD to Ignore part of a data set?

Maybe this will help.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-21-2011
03:09 PM

04-21-2011
03:09 PM

Re: Can I get MathCAD to Ignore part of a data set?

Thanks-your sample file addresses exactly the issue, and illustrates how to strucuture a solution.