Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Curve Plotting

  • 12-02-2006 04:02PM
    #1
    Closed Accounts Posts: 102 ✭✭


    Does anyone know how to plot a curve given 4 points? I'm doing this in matlab and using this curve I'm trying to predict the 5th point.

    Any help is much appreciated, cheers.


Comments

  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    Freehand WIth a pencil???
    Is it a quadratic graph??


  • Registered Users, Registered Users 2 Posts: 33,518 ✭✭✭✭dudara


    you can create any kind of function that will fit four points and thus predict a 5th. however, to really do it, you should have a physical interpretation.

    Give us a bit more info on the problem.


  • Registered Users, Registered Users 2 Posts: 3,608 ✭✭✭breadmonkey


    Search the help section for "interp1". I think that can do it. I can't really explain it properly because I only used that function for the first time the other day.


  • Registered Users, Registered Users 2 Posts: 3,608 ✭✭✭breadmonkey


    Freehand WIth a pencil???
    Is it a quadratic graph??

    Come on man, we have a new thing called "technology"!:p


  • Closed Accounts Posts: 102 ✭✭henry hill


    dudara wrote:
    Give us a bit more info on the problem.

    Sorry for the lack of info. I'm doing a project on an autotram and need to be able to predict the the path of an object using a LIDAR range scanner. I'll try and give some sample input...

    I have 4 points (representing the object @ sequential time intervals) with x representing the distance from the from the LIDAR and y the angle from it:
    @time = 0 (2,2)
    @time = 1 (4,6)
    @time = 2 (5,6)
    @time = 3 (4,7)

    Q1. How do I represent these points as an equation and then as a curve?
    Q2. How do I calculate the predicted 5th point @ time = 4? I believe i need to calculate the velocity, acceleration and jerk, but i'm unsure how to pull it all together?

    Any help would be much appreciated. Thanks.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,372 ✭✭✭silverside


    so can fit 4th order polynomial to 4 points, dunno how to do it in matlab but it's easy in general (think it might even be on LC syllabus)


  • Closed Accounts Posts: 21 Single Cell


    @time=4 (2,11)


Advertisement