You are on page 1of 3

% Programa de Grficas y Derivadas

% UNIVERSIDAD TCNICA DE AMBATO

% Facultad de Ingeniera Civil y Mecnica FICM

% Carrera de Ingeniera Civil

% MDULO DE ECUACIONES DIFERENCIALES

% Cuarto Semestre - Paralelo "B" - Grupo N 9

% Chicaiza Fabricio, Pico Victor, Romero Melanie

% Uso de subplot en grficas y sus derivadas

% Limpieza de variables y escritorio

clear all;

close all;

clc;

% Parmetros iniciales de entradas de variables

syms x

y=sin(x).*((cos(x)).^2)+2*x;

h=diff(y);

j=subs(h,x,pi/2);

subplot(2,1,1);ezplot(y);set(ezplot(y),'Color','r','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin');grid;...
subplot(2,1,2);ezplot(h);set(ezplot(h),'Color','g','LineStyle',':');hold on;
plot((pi/2),j,'r*');text((pi/2),j,'Punto (pi/2,2)');title('Primera Derivada');...

xlabel('Eje x');ylabel('Eje y');legend('Derivada');grid;

% FIN

% Programa de Grficas y Derivadas

% UNIVERSIDAD TCNICA DE AMBATO

% Facultad de Ingeniera Civil y Mecnica FICM

% Carrera de Ingeniera Civil

% MDULO DE ECUACIONES DIFERENCIALES

% Cuarto Semestre - Paralelo "B" - Grupo N 8

% Altamirano Paulina, Gonzalez Christian, Diego Maldonado

% Uso de subplot en grficas y sus derivadas

% Limpieza de variables y escritorio

% Limpieza de variables y escritorio

clear all;

close all;

clc;

% Parmetros iniciales de entradas de variables

>> syms x;

>> y = 2.*x + 8.*x.^3 + 3.*x.^4 + 12.*x.^6;


>> y1 = diff(y,x)

>> y2= diff(y,x,2)

>> y3 = diff(y,x,3)

>> y4 = diff(y,x,4)

>> y5 = diff(y,x,5)

>> y6= diff(y,x,6)

>> y7 = diff(y,x,7)

>>subplot(2,4,1);ezplot(y);set(ezplot(y),'Color','r','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin');grid;...
subplot(2,4,2);ezplot(y1);set(ezplot(y1),'Color','b','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y1');grid;...
subplot(2,4,3);ezplot(y2);set(ezplot(y2),'Color','k','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y2');grid;...
subplot(2,4,4);ezplot(y3);set(ezplot(y3),'Color','m','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y3');grid;...
subplot(2,4,4);ezplot(y3);set(ezplot(y3),'Color','b','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y3');grid;...
subplot(2,4,5);ezplot(y4);set(ezplot(y4),'Color','m','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y4');grid;...
subplot(2,4,6);ezplot(y5);set(ezplot(y5),'Color','r','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y5');grid;...
subplot(2,4,7);ezplot(y6);set(ezplot(y6),'Color','b','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y6');grid;...
subplot(2,4,8);ezplot(y7);set(ezplot(y7),'Color','g','LineStyle','-.');title('Grafica de la
funcin');xlabel('Eje x');ylabel('Eje y');legend('Funcin y7');grid;...

%FIN

You might also like