10-07-2008 04:15 PM
Hello there.
I was wondering if someone can point me to the right direction with this problem i am facing.
currently, my program read a device data and graph it on the chart.
it takes the date of the first data, the last data and 2 or 4 weeks ago.
i want to calculate the slope of the graph according to what days i want it.
right now, my x axis from days 143 to 177
on the graph, i change it from 150-170 for instant.
what can i do to get the value of the x axis from the chart?
i hope i am not confusing you with my discriptions.
Solved! Go to Solution.
10-07-2008 05:37 PM - edited 10-07-2008 05:38 PM
i think this is the right direction?
i change x scale to 154 and 169.
how do i get all the data of the array from 154 to 169?
10-07-2008 07:04 PM
Well, it looks like you have an xy graph and not a chart.
Graphs allow cursors, so one simple way would be to place two cursors and do a linear regression of the data in-between.
A very old example can be found here. See if this helps.
10-07-2008 07:11 PM
no, that didnt helped much.
so everytime i change the scaling values of my x-axis,
i want the system to calculate the slope between those values.
i need to rearrange/cut my array so that he will take data from 150 to 170 for instant.
lets say that i have 200 days worth of data.
from day 1 to day 200.
but because of errors in the system. i want to take only the good data.
after looking at all of them. i know that the data from 150 to 170 is good.
i want to use the scaling of 150 to 170 and find the slope of that.
currently, my program take the slope of day 1 to day 200.
10-07-2008 07:26 PM
10-08-2008 04:27 PM
you are right as always. that example did helped.
i got one more question.i am working with events structure.
so when i change the xmin and xmax scale values of the graph. i want it to automatically do the slope.
right now, i click on a button to recalculate the slope and i really don't want to press any button.
i cant seems to find anyways to add the change of the xmin and xmax values into the event structure?