3rd order polynomials in MATLAB?

33 views (last 30 days)
Teddy Xiong
Teddy Xiong on 19 Oct 2012
Need help with problem. I am very confused. Don't know where to start and this question is very hard for me. I tried getting started with
function[coeff lp fd] = SkiJump(l,h0,hf,s0,sf)
coeff=[]
lp= minmax(SkiJump)
fd= hf-20
plot(h0,s0)
but I am just too confused. I missed class due to sickness and i still have to turn in my homework and now I have no idea how to do anything concerning linear equations.
THis is the question
You have been hired as an intern at a ski resort. Your first intern project is to create a new design for a ski jump. Your boss is a big fan of 3rd order polynomials and therefore wants you to design the ski jump based on a 3rd order polynomial. For initial design purposes, your boss wants you to write a MATLAB function called SkiJump which will be used to evaluate the feasability of the design.
The equations of the 3rd order polynomial H(x) and the slope s(x) are defined below:
H(x)=p3x3 +p2x2 +p1x+p0
s(x) = 3p3x2 + 2p2x + p1
*The function header should look like the following:*
function [coeff lp fd] = SkiJump(l,h0,hf,s0,sf)
The inputs to the function are:
the horizontal distance from the start to the launch point (in feet).
h0: the initial height (in feet).
hf: the final height (in feet).
s0: the initial slope (in feet/feet). Must be less than or equal to zero.
sf: the final slope (in feet/feet). Must be greater than or equal to zero.
The outputs from the function are:
coeff: a vector containing the coefficients of the 3rd order polynomial. The coefficients
must be arranged from p3 to p0.
lp: the lowest point of the ski jump design.
fd: the ski jumper’s flying distance.
*To calculate fd assume the following:*
(a) Gravitational acceleration = 32.1522 ft/s2
(b) Neglect ground and air frictions and use conservation of energy in determining the speed of the skier when he/she leaves the jump.
(c) Assume that the ground is at height hf-20 feet.
In addition, the function should also plot the shape of the new ski jump, which is given in figure 1.

Answers (2)

Image Analyst
Image Analyst on 19 Oct 2012
Take a look at polyfit() and polyval(). You may also find interp1() helpful.
  2 Comments
Image Analyst
Image Analyst on 19 Oct 2012
I don't know - I didn't go over it in detail. I just saw something about trying to get coefficients from a 3rd order polynomial so polyfit() popped into mind.

Sign in to comment.


Dr. Seis
Dr. Seis on 19 Oct 2012
Edited: Dr. Seis on 19 Oct 2012
My answer for a different, but similar question might help (at least for the function for the ramp):

Categories

Find more on Polynomials in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by