Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function y=difdiv(f,v)
- tam=size(v)
- tam=tam(1,2)
- if (tam==2) then
- y=(f(v(2))-f(v(1)))/(v(2)-v(1))
- printf("entro con argumentos: v1: %f v2: %f\t",v(1),v(2))
- else
- printf("entro aca")
- v1=v(2:tam)
- v2=v(1:tam-1)
- y=(difdiv(f,v1)-difdiv(f,v2))/(v(tam)-v(1))
- end
- endfunction
Add Comment
Please, Sign In to add comment