main10 - ap1 bp1 ap2 bp2 ap3 bp3 ap4 bp4 b [app1,bpp1] =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% % Derek Rampal HW 10 % Main script % format long; f 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]; y xeval = zeros(1,1); xeval = [10]; x S = cubic_spline_get_coeffs(xpts,ypts); Sp = splined(S); Spp = splined(Sp); S tolerance = 1e-5; t [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);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ap1 bp1 ap2 bp2 ap3 bp3 ap4 bp4 b [app1,bpp1] = brutes(Spp, xpts, 1, tolerance, 3,0); [app2,bpp2] = brutes(Spp, xpts, 2, tolerance, 3,0); [app3,bpp3] = brutes(Spp, xpts, 3, tolerance, 3,0); [app4,bpp4] = brutes(Spp, xpts, 4, tolerance, 3,0); app1 bpp1 app2 bpp2 app3 bpp3 app4 bpp4 b y = cubic_spline_evaluate ((app3+bpp3)/2,Sp,xpts); y (ap3(1,1)+bp3(1,1))/2 (ap3(1,2)+bp3(1,2))/2 (app3+bpp3)/2 y...
View Full 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.

Ask a homework question - tutors are online