Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. x = [0:0.1:100];
  2. xx = 100*rand(1,1000);
  3. [xx, k] = gsort(xx,'c','i');
  4. yy = exp(sin(exp(sin(xx)+cos(xx))+xx));
  5. listaXY = [xx; yy]
  6. yy = interpln(listaXY,x)
  7. clf()
  8. ymax1 = max(listaXY (2,:)) // Valores máximos de y
  9. ymax2 = max(yy)
  10. rect = [0,0,90,1]; // Define retângulo de plotagem
  11. plot2d(listaXY(1,:),listaXY(2,:)) // Plota a tabela
  12. xset('mark',-9,1)
  13. plot2d(xx,yy,-9,'010','y',rect) // Plota dados interpolados
  14. xtitle('Interpolacao Linear','x','y')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement