Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [0:0.1:100];
- xx = 100*rand(1,1000);
- [xx, k] = gsort(xx,'c','i');
- yy = exp(sin(exp(sin(xx)+cos(xx))+xx));
- listaXY = [xx; yy]
- yy = interpln(listaXY,x)
- clf()
- ymax1 = max(listaXY (2,:)) // Valores máximos de y
- ymax2 = max(yy)
- rect = [0,0,90,1]; // Define retângulo de plotagem
- plot2d(listaXY(1,:),listaXY(2,:)) // Plota a tabela
- xset('mark',-9,1)
- plot2d(xx,yy,-9,'010','y',rect) // Plota dados interpolados
- xtitle('Interpolacao Linear','x','y')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement