Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear
- clc
- syms x t
- f=inputdlg('Funcion: ');
- f=sym(f(1));
- a=inputdlg('Desde: ');
- a=str2double(a);
- b=inputdlg('Hasta: ');
- b=str2double(b);
- giro=inputdlg('En que eje? (ex o ey)');
- giro = char(giro);
- grid on
- subplot(1,2,1)
- ezplot(f,[a,b]);
- hold on
- switch giro
- case 'ex'
- subplot(1,2,2)
- ezsurf(x, f*cos(t),f*sin(t),[0,2*pi,a,b])
- int(2*pi*x*f,a,b)
- break;
- case 'ey'
- f = finverse(f);
- subplot(1,2,2)
- ezsurf(f*cos(t),f*sin(t),x,[0,2*pi,a,b])
- int(2*pi*x*f,a,b)
- break;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement