centdet - elseif j==n dz(j) = (y(n)-y(n-1))./(x(n)-x(n-1));...

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

View Full Document Right Arrow Icon
function [dz] = centdet(fh,a,b,n) x=linspace(a,b,n); for i =1:length(x) y(i)=fh(x(i)); end e for j = 1:length(x) if j==1 dz(j)=(y(2)-y(1))./(x(2)-x(1));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif j==n dz(j) = (y(n)-y(n-1))./(x(n)-x(n-1)); else dz(j)=(y(j+1)-y(j-1))./(x(j+1)-x(j-1)) end end...
View Full Document

This note was uploaded on 11/16/2009 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at University of California, Berkeley.

Ask a homework question - tutors are online