1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: MATLAB. Creating a function involving interpolation.

  1. Nov 26, 2011 #1
    I have attached a pdf of the complete problem. I have been trying this for a few days and still can't figure it out. The book provided with this course does not give good information on this topic nor did the class lecture.

    y1 = interp1(x,y,x1)

    This is what I have so far:

    function y1 = lookup(getTemp)

    table = [99.63, 100, 120, 160, 200, 240, 280, 320, 360, 400, 440, 500
    1.694, 1.696, 1.793, 1.984, 2.172, 2.359, 2.546, 2.732, 2.917, 3.103, 3.288, 3.565];

    if getTemp > 10
    y1 = interp1(table, getTemp);

    Any help would be greatly appreciated. I am really struggling.
    1. The problem statement, all variables and given/known data

    2. Relevant equations

    3. The attempt at a solution

    Attached Files:

  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted