Page 1 of 1

Exporting "new" data points...

Posted: Wed Jan 06, 2010 3:06 pm
by joecar
Hi,

I have a set of data points (where, say, the x axis increments by 10)...

I want to interpolate/graph these... (this part is fine)...

Then, I want to specify a different set of x values from which I want to export (csv) a new set of data points from that graph (i.e., say the x axis now increments by 7)...
i.e. I want to export a new set of data points based on the interpolated graph of the old data points... How would I go about doing this...?

I have a spreadsheet of the new x axis values, can I use this to specify the new x axis values...?

Thanks, I appreciate your help,
Joe
:)

Posted: Wed Jan 06, 2010 6:11 pm
by DPlotAdmin
I'm not quite sure I follow this. It sounds like you have an original curve and produce a new curve with a different spacing in X, and want to save and/or copy that new curve - right? If so then there's nothing to it - select File>Save As. In the "Save As Type" box select "ASCII (1 curve only)". You'll eventually be prompted for which curve you want to save.

If you'd rather copy the new curve to the clipboard, select Edit>Copy>Data Values.

If I've misunderstood what you want to do please let me know.

How do I do this...

Posted: Wed Jan 06, 2010 6:21 pm
by joecar
Hi Dave,

Let me attempt to explain...

From the original graph I want to create/export a table of data points (x,y) for various discrete values of x...

e.g.
my original data is (10,100), (20, 200), (30, 300),
the graph of this is a smooth line (i.e. interpolated),
from this graph I want to extract/export a table of (x,y) for x=7, 14, 21, 28...

Thanks,
Joe

Posted: Wed Jan 06, 2010 6:40 pm
by DPlotAdmin
Use Edit>Equal Intervals with the interval set to 7. Which interpolation method you should use you'll have to answer for yourself. "Linear" is straightforward but may miss peaks and valleys. The others will produce a smoother curve but, depending on the spacing in the original data and how it varies, might produce nonsense.

Posted: Wed Jan 06, 2010 7:26 pm
by joecar
Hmmm... I tried Equal Intervals and I didn't like what it did...

Let me try a different approach...

For a given curve, I want to save it as .csv, but I want only the points for specific values of x...

[would I have to do this afterwards by editing the .csv file...?]

Posted: Wed Jan 06, 2010 8:25 pm
by DPlotAdmin
would I have to do this afterwards by editing the .csv file...?
Yes, or you could save yourself a bit of trouble with a couple of manipulations first.

1) Edit>Operate on Y with "if(mod(x,7)=0,y,<some arbitrarily large value>)"

This will set all Y values for which X is not a multiple of 7 to <some arbitrarily large value>.

2) Edit>Clip Y with the high value set to <some arbitrarily large value>, minus a small constant.

Posted: Wed Jan 06, 2010 8:55 pm
by joecar
Ok, how about this...

- import data points via .csv file,
- do Equal Interval (0.001, linear) to "fill in" by interpolation,
- do Edit Data and delete the points not wanted...
- save as .csv (further edit to delete the points not wanted).

The third step is tedious... is there a way to select multiple points and delete those...?

Posted: Wed Jan 06, 2010 8:57 pm
by joecar
DPlotAdmin wrote:
would I have to do this afterwards by editing the .csv file...?
Yes, or you could save yourself a bit of trouble with a couple of manipulations first.

1) Edit>Operate on Y with "if(mod(x,7)=0,y,<some arbitrarily large value>)"

This will set all Y values for which X is not a multiple of 7 to <some arbitrarily large value>.

2) Edit>Clip Y with the high value set to <some arbitrarily large value>, minus a small constant.
Ah, ok, I'll play with this also.

Thanks.

Posted: Wed Jan 06, 2010 9:20 pm
by joecar
Is there an operator for "not equal"...?

Posted: Wed Jan 06, 2010 10:26 pm
by DPlotAdmin
Is there an operator for "not equal"...?
No, but you can generally rearrange things to do the same thing. For example this (non-working) case:

if(mod(x,7)<>0,<some arbitrarily large value>,y)

is equivalent to this:

if(mod(x,7)=0,y,<some arbitrarily large value>)