Guest User

Untitled

a guest
Mar 8th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.34 KB | None | 0 0
  1. function y=difdiv(f,v)
  2.     tam=size(v)
  3.     tam=tam(1,2)
  4.     if (tam==2) then
  5.         y=(f(v(2))-f(v(1)))/(v(2)-v(1))
  6.         printf("entro con argumentos: v1: %f v2: %f\t",v(1),v(2))
  7.     else
  8.         printf("entro aca")
  9.         v1=v(2:tam)
  10.         v2=v(1:tam-1)
  11.         y=(difdiv(f,v1)-difdiv(f,v2))/(v(tam)-v(1))
  12.     end
  13. endfunction
Add Comment
Please, Sign In to add comment