hw10_derek_rampal

hw10_derek_rampal - Derek Rampal 10/05/2008 HW 10 18a. % %...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Derek Rampal 10/05/2008 HW 10 18a. % % Main script % xpts = zeros(5,1); xpts = [0;3;5;8;13]; ypts = zeros(7,1); ypts = [75;0;225;383;623;993;72]; S=cubic_spline_get_coeffs(xpts,ypts); xeval = zeros(1,1); xeval = [10]; y = cubic_spline_evaluate (xeval,S,xpts); y Output: y = 774.8384 18b c and d. I wasnt thinking and i rewrote code without having to. ... Code: % % Derek Rampal HW 10 % Main script % format long ; xpts = zeros(5,1); xpts = [0;3;5;8;13]; xlen = length(xpts); ypts = zeros(7,1); ypts = [75;0;225;383;623;993;72]; xeval = zeros(1,1); xeval = [10]; S = cubic_spline_get_coeffs(xpts,ypts); Sp = splined(S); Spp = splined(Sp); tolerance = 1e-5; [ap1,bp1] = brutes(Sp, xpts, 1, tolerance, 3,55*5280/3600); [ap2,bp2] = brutes(Sp, xpts, 2, tolerance, 3,55*5280/3600); [ap3,bp3] = brutes(Sp, xpts, 3, tolerance, 3,55*5280/3600); [ap4,bp4] = brutes(Sp, xpts, 4, tolerance, 3,55*5280/3600); ap1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
bp1 ap2 bp2 ap3 bp3 ap4 bp4 [app1,bpp1] = brutes(Spp, xpts, 1, tolerance, 3,0); [app2,bpp2] = brutes(Spp, xpts, 2, tolerance, 3,0);
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/19/2009 for the course MATH numerical taught by Professor Ford during the Spring '09 term at FAU.

Page1 / 5

hw10_derek_rampal - Derek Rampal 10/05/2008 HW 10 18a. % %...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online