how to find slope of discrete point?












0












$begingroup$


I am wondering if it is possible to find the slope at each point in the following dataset,




% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067



I understand that the slope can be obtained using the difference of the two neighboring points by



$$m = frac{y_2-y_1}{x_2-x_1}$$



and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$



$$theta = tan^{-1}(m) $$



But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.










share|cite|improve this question









$endgroup$












  • $begingroup$
    The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
    $endgroup$
    – Matti P.
    Jan 8 at 13:54










  • $begingroup$
    There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
    $endgroup$
    – BeeTiau
    Jan 8 at 13:56








  • 1




    $begingroup$
    @BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
    $endgroup$
    – Adrian Keister
    Jan 8 at 14:06
















0












$begingroup$


I am wondering if it is possible to find the slope at each point in the following dataset,




% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067



I understand that the slope can be obtained using the difference of the two neighboring points by



$$m = frac{y_2-y_1}{x_2-x_1}$$



and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$



$$theta = tan^{-1}(m) $$



But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.










share|cite|improve this question









$endgroup$












  • $begingroup$
    The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
    $endgroup$
    – Matti P.
    Jan 8 at 13:54










  • $begingroup$
    There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
    $endgroup$
    – BeeTiau
    Jan 8 at 13:56








  • 1




    $begingroup$
    @BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
    $endgroup$
    – Adrian Keister
    Jan 8 at 14:06














0












0








0





$begingroup$


I am wondering if it is possible to find the slope at each point in the following dataset,




% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067



I understand that the slope can be obtained using the difference of the two neighboring points by



$$m = frac{y_2-y_1}{x_2-x_1}$$



and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$



$$theta = tan^{-1}(m) $$



But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.










share|cite|improve this question









$endgroup$




I am wondering if it is possible to find the slope at each point in the following dataset,




% X Y
%===================
0.7761 0.5715
0.794 0.5729
0.8117 0.5744
0.8292 0.5762
0.8465 0.5782
0.8637 0.5804
0.8807 0.5828
0.8977 0.5853
0.9144 0.5879
0.9311 0.5907
0.9477 0.5937
0.9641 0.5968
0.9805 0.6
0.9967 0.6033
1.0129 0.6067



I understand that the slope can be obtained using the difference of the two neighboring points by



$$m = frac{y_2-y_1}{x_2-x_1}$$



and, the angle that each point made with the $x$-axis is essentially the $atan$ of $m$



$$theta = tan^{-1}(m) $$



But, is it possible to calculate the slope without using the above formula? without trying to curve-fit the points.







vector-analysis angle slope






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 8 at 13:51









BeeTiauBeeTiau

758




758












  • $begingroup$
    The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
    $endgroup$
    – Matti P.
    Jan 8 at 13:54










  • $begingroup$
    There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
    $endgroup$
    – BeeTiau
    Jan 8 at 13:56








  • 1




    $begingroup$
    @BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
    $endgroup$
    – Adrian Keister
    Jan 8 at 14:06


















  • $begingroup$
    The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
    $endgroup$
    – Matti P.
    Jan 8 at 13:54










  • $begingroup$
    There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
    $endgroup$
    – BeeTiau
    Jan 8 at 13:56








  • 1




    $begingroup$
    @BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
    $endgroup$
    – Adrian Keister
    Jan 8 at 14:06
















$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54




$begingroup$
The formula that you're using for the slope $m$ assumes that the function $y=f(x)$ is linear between the points. There are other methods, too. It's possible to assume a quadratic relation, etc ... But why do you ask if it's possible to calculate without using the formula? What's wrong with using the formula?
$endgroup$
– Matti P.
Jan 8 at 13:54












$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56






$begingroup$
There's nothing wrong with the formula. The reason is that the method is heavily dependent on the sampling rate of the points. I am curious if there is any other method or approach that can be used.
$endgroup$
– BeeTiau
Jan 8 at 13:56






1




1




$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06




$begingroup$
@BeeTiau: I'd take Matti P's suggestion, and assume a reasonable polynomial shape (why polynomial? Because they're super-easy to differentiate), differentiate that, and get the derivative value at the desired points. This method has the advantage of smoothing out your data a bit (fitting a curve is a summation process, and hence smoothing, whereas raw differentiation like you did makes graphs more jagged and noisy). As for sampling rate, fitting a reasonable polynomial (you might look up cubic splines) will mitigate that.
$endgroup$
– Adrian Keister
Jan 8 at 14:06










1 Answer
1






active

oldest

votes


















1












$begingroup$

In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.



This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
    $endgroup$
    – BeeTiau
    Jan 8 at 15:45










  • $begingroup$
    All you need are a series of (x, y) values.
    $endgroup$
    – marty cohen
    Jan 8 at 20:06












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066184%2fhow-to-find-slope-of-discrete-point%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.



This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
    $endgroup$
    – BeeTiau
    Jan 8 at 15:45










  • $begingroup$
    All you need are a series of (x, y) values.
    $endgroup$
    – marty cohen
    Jan 8 at 20:06
















1












$begingroup$

In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.



This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
    $endgroup$
    – BeeTiau
    Jan 8 at 15:45










  • $begingroup$
    All you need are a series of (x, y) values.
    $endgroup$
    – marty cohen
    Jan 8 at 20:06














1












1








1





$begingroup$

In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.



This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).






share|cite|improve this answer









$endgroup$



In my experience,
when trying to estimate the slope at a point,
it is better to use the slope of the line
between the preceding and following point.



This is analogous to the fact that
$f'(x)$
is more accurately estimated by
$(f(x+h)-f(x-h))/(2h)$
(error of order $h^2$)
than by
$(f(x+h)-f(x))/(h)$
(error of order $h$).







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 8 at 15:26









marty cohenmarty cohen

74.9k549130




74.9k549130












  • $begingroup$
    Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
    $endgroup$
    – BeeTiau
    Jan 8 at 15:45










  • $begingroup$
    All you need are a series of (x, y) values.
    $endgroup$
    – marty cohen
    Jan 8 at 20:06


















  • $begingroup$
    Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
    $endgroup$
    – BeeTiau
    Jan 8 at 15:45










  • $begingroup$
    All you need are a series of (x, y) values.
    $endgroup$
    – marty cohen
    Jan 8 at 20:06
















$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45




$begingroup$
Thanks. Meaning that there is no way we can estimate the slope without knowing the functions (or trend?) of the data?
$endgroup$
– BeeTiau
Jan 8 at 15:45












$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06




$begingroup$
All you need are a series of (x, y) values.
$endgroup$
– marty cohen
Jan 8 at 20:06


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3066184%2fhow-to-find-slope-of-discrete-point%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Cabo Verde

Gyllenstierna