%FUNCIONES MATEMÁTICAS EN MATLAB f='2*x*tan(x^2)' ff=vectorize(f) x=[3, 7,0.1, pi/2] y=eval(ff) fff=sym(f) diff(fff,1) int(fff) clear %POLINOMIOS EN MATLAB f='30*x^7+2*x^5-pi*x^2+1' ff=vectorize(f) x=[3, 7,0.1, pi/2] y=eval(ff) % o bien f=[30, 0, 2, 0, 0, -pi, 0, 1] Y=polyval(f,x) y Y-y g=polyder(f) roots(f) conv(f,g) poly([3,4,-9]) clear %GRÁFICOS 2D EN MATLAB x=[2,4,-3]; y=[1,2,4]; plot(x,y,'g') hold on x=[2,4,-3,2]; y=[1,2,4,1]; plot(x,y,'r:') hold off f='2*x*tan(x^2)' ff=vectorize(f) x=[0:10^-3:sqrt(pi/4)] y=eval(ff) plot(x,y) legend('y=2*x*tan(x^2)')