clc clear all close all syms x f1=x f2=(x^2) f3=(x^3) f4=sin (x) f5=cos (x) f6=tan (x) a1=-8:1:8; a2=-5:.01:5; a3=-9:0.1:9; a4=-5:1:10; a5=-7:1.5:7; a6=-10:0.1:10; b1=subs (f1,a1); b2=subs (f2,a2); b3=subs (f3,a3); b4=subs (f4,a4); b5=subs (f5,a5); b6=subs (f6,a6); subplot (2,2,3) plot (a1,b1,'k') hold on plot (a2,b2,'r') plot (a3,b3,'b') plot (a4,b4,'c') plot (a5,b5,'y') plot (a6,b6,'m') grid on xlabel ('eje x') ylabel ('eje y') title('6 graficas') legend ('lineal','cuadratica','cubica','seno','coseno','tangente') subplot (4,2,2) plot(a3,b3,'b') grid on xlabel ('eje x') ylabel ('eje y') title ('x^3') legend ('cúbica') subplot (4,2,4) plot (a4,b4,'c') grid on xlabel ('eje x') ylabel ('eje y') title ('trigonometrica') legend ('seno') subplot (4,2,6) plot (a5,b5,'y') grid on xlabel ('eje x') ylabel ('eje y') title ('trigonometrica') legend ('coseno') subplot (4,2,8) plot (a6,b6,'m') grid on xlabel ('eje x') ylabel ('eje y')
title ('trigonometrica') legend ('tangente') subplot (2,4,1) plot (a1,b1,'k') grid on xlabel ('eje x') ylabel ('eje y') title ('x') legend ('lineal') subplot (2,4,2) plot (a2,b2,'r') grid on xlabel ('eje x') ylabel ('eje y') title ('x^2') legend ('cuadratica')