+ Reply to Thread
Results 1 to 5 of 5

Finding gradient of every points on a curve in excel

  1. #1
    Registered User
    Join Date
    04-09-2015
    Location
    Singapore
    MS-Off Ver
    Ms Office 2013
    Posts
    2

    Finding gradient of every points on a curve in excel

    Say if i have 5 data points and plotted it out as a scattered line curve in excel, how can i possibly find the gradient of every points on the curve in excel? Please help !

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Finding gradient of every points on a curve in excel

    I often find that I must first understand the mathematical principles behind a problem before I can work out the programming. Are you using the term "gradient" to mean "derivative" or "slope", so that this becomes a calculus problem?

    If that is the case, the approach I would generally use for something like this is to regress a "best fit" function for the 5 data points, then use calculus to determine the formula for the first derivative of that function, then program that formula into Excel.

    If your function is "linear", then you can perform the regression using the LINEST() function https://support.office.com/en-us/art...rs=en-US&ad=US

    Excel does not really know calculus, so it will be up to you to know how to take the derivative (symbolically or numerically).

    Once you have that, then it should be straightforward to program that into Excel.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    04-09-2015
    Location
    Singapore
    MS-Off Ver
    Ms Office 2013
    Posts
    2

    Re: Finding gradient of every points on a curve in excel

    Thank you for your reply. To be frank I have no experience in integrating programming into Excel to perform computation for something even though I have the knowledge of calculus. Is it possible for you to randomly put 5 data points, plot out the graph and insert the formula as you said that can output the slope of every points on the curve for me as an example? Thank you.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Finding gradient of every points on a curve in excel

    I won't be able to right away (obviously, after 8 hours). It will be difficult to provide a useful example without f(x) or f'(x), which I assume you already know. Do you know if your desired f(x) is "linear" or "non-linear", so we will know if the LINEST() function is appropriate?

    To be frank I have no experience in integrating programming into Excel to perform computation for something even though I have the knowledge of calculus.
    I'm not sure how to interpret this statement. Perhaps we need to start at some very basic help for using formulas in Excel. If you are truly and completely unfamiliar with how to program computations into Excel, I might start with a help file like this: https://support.office.com/en-us/art...rs=en-US&ad=US to become familiar with the basic principles for performing calculations in Excel. If and when I get around to putting an example together, it will depend on you understanding basic formula syntax, including cell referencing and other basic concepts.

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Finding gradient of every points on a curve in excel

    Here's a sample that I very quickly put together. I used a simple straight line (y=mx+b), which means that the slope calculation is almost trivial, since slope is independent of x. This should illustrate the basic steps (regression, differentiation, calculation of slope at x) that I would use for this kind of thing.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Applying gradient to data points in 3d charts
    By AnkitGuru in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2013, 04:34 AM
  2. Peak and Valley points of multiple stepped curve in Excel graph
    By venkatm in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-01-2012, 08:35 PM
  3. Peak and Valley points of multiple stepped curve in Excel graph
    By venkatm in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-31-2012, 05:42 PM
  4. [SOLVED] How do I plot a parabolic curve from 2 data points in excel?
    By Paula C in forum Excel General
    Replies: 1
    Last Post: 10-26-2005, 12:05 PM
  5. Finding y-Values in budget curve app w/ excel
    By James Gross IV in forum Excel General
    Replies: 2
    Last Post: 09-11-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1