correct_310 - 238.25*x(i,1); end plot (x, U) end e

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

View Full Document Right Arrow Icon
function correct_310(dx) f x = (0:dx:10)'; x npts = size(x); n for i = 1:npts U (i,1) = (-5/6)*(sing(x(i,1), 0, 4) - sing(x(i,1), 5, 4)) + (15/6)*sing(x(i,1), 8, 3) + 75*sing(x(i,1), 7, 2) + (57/6)*(x(i,1))^3 -
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 238.25*x(i,1); end plot (x, U) end e %-------------------------------------------------------function new = sing (x,a,n) if x>a new = (x-a)^n; else new = 0; end end...
View Full Document

Ask a homework question - tutors are online