# LabVIEW

cancel
Showing results for
Did you mean:

## How to graph with missing data?

Okay, this is a relativly simple question but I can't figure out an
alorithm.

Suppose I have a function y = x^2 and an array of "X" values [1 2 3 4
10]. I would get an array of "Y" values of [1 4 9 16 100]. Now, how
can I graph this if I don't have data for x=5-9? The graph will assume
X values of 1-5.

Of course, in my real problem there is no function. I have sampled a
lot of data at low X-values and a little at the middle values, and a lot
of the high X-values. I need to interpolate the data, but the
interpolate fucntion is not what I'm looking for (it assumes you have
uniform X-values)

Rick
rick@csciences.com

Chesapeake Sciences Corp.
1127B Benfield Blvd Millersville, MD 21108

Te
l: (410) 923-1300 x3430 Fax: (410) 923-2669
Message 1 of 3
(1,627 Views)

## Re: How to graph with missing data?

I'm such an idiot.

I eventually wrote a VI to do what I wanted (thanks to Mr. Ahlers for a
VI that showed me how to use the Ramp function).

It turns out it does the exact same thing as an XY Graph. I never knew
that there was such a beast, I have always used the standard charts and
graphs. Oh well, I guess it was a learning experience.

Rick
Message 2 of 3
(1,627 Views)

## Re: How to graph with missing data?

If I understand what you're asking, you a XY graph simply plots whatever
data values are present. They don't have to be in any particular order or
spacing. The plot simply displays the data in the order they appear in the
input data. Alternately, an any plot a Y value of NaN is not displayed but
the space for the point is held on the x axis.

Mike...

Rick Nelson wrote:

> Okay, this is a relativly simple question but I can't figure out an
> alorithm.
>
> Suppose I have a function y = x^2 and an array of "X" values [1 2 3 4
> 10]. I would get an array of "Y" values of [1 4 9 16 100]. Now, how
> can I graph this if I don't have data for x=5-9? The graph will assume
> X values of 1-5.
>
> Of course, in my real problem there is no function. I have sampled a
> lot o
f data at low X-values and a little at the middle values, and a lot
> of the high X-values. I need to interpolate the data, but the
> interpolate fucntion is not what I'm looking for (it assumes you have
> uniform X-values)
>
> Thank you for your help.
>
> Rick
> rick@csciences.com
>
> Chesapeake Sciences Corp.
> 1127B Benfield Blvd Millersville, MD 21108
>
> Tel: (410) 923-1300 x3430 Fax: (410) 923-2669
Message 3 of 3
(1,627 Views)