Advertisement
HeNrYTG50

master

Dec 10th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. clear
  2. clc
  3.  
  4.  
  5. syms x t
  6. f=inputdlg('Funcion: ');
  7. f=sym(f(1));
  8. a=inputdlg('Desde: ');
  9. a=str2double(a);
  10. b=inputdlg('Hasta: ');
  11. b=str2double(b);
  12.  
  13. giro=inputdlg('En que eje? (ex o ey)');
  14. giro = char(giro);
  15. grid on
  16. subplot(1,2,1)
  17. ezplot(f,[a,b]);
  18. hold on
  19. switch giro
  20. case 'ex'
  21. subplot(1,2,2)
  22. ezsurf(x, f*cos(t),f*sin(t),[0,2*pi,a,b])
  23. int(2*pi*x*f,a,b)
  24. break;
  25. case 'ey'
  26. f = finverse(f);
  27. subplot(1,2,2)
  28. ezsurf(f*cos(t),f*sin(t),x,[0,2*pi,a,b])
  29. int(2*pi*x*f,a,b)
  30. break;
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement