PROGRAMAS DE MATHLAB

Páginas: 6 (1277 palabras) Publicado: 16 de noviembre de 2015
PROGRAMA A
% PROGRAMA DE UNA FUNCION Y SU DERIVADA
% UNIVERSIDAD TÉCNICA DE AMBATO
% Facultad de Ingeniería Civil y Mecánica
% Carrera de Ingeniería Civil
% MÓDULO DE ECUACIONES DIFERENCIALES

% Cuarto Semestre - Paralelo "A" - Grupo N° 7
% Chimbo Farid,Robalino Mariela,Segura Katherine

% Grafica del literal a de la hoja 5


%De acuerdo al polinomio siguiente, calcular su derivada y evaluardicha derivada en pi/2

% Limpieza de variables y escritorio

clear all;
close all;
clc;

% Parámetros iniciales de entradas de variables

syms x
y=sin(x).*((cos(x)).^2)+2*x;
h=diff(y);
j=subs(h,x,pi/2);
figure(1);
y1=ezplot(y),xlabel('Eje x');ylabel('Eje Y');legend('y= función');grid;set(ezplot(y),'color','b','LineStyle','-.');grid;title('Grafica de la función');
figure (2);y2=ezplot(h);xlabel('Eje x');ylabel('Eje Y');legend('h= derivada');grid;set(ezplot(h),'Color','g','LineStyle',':');title('Primera Derivada');
figure (3);
hold on
y3=ezplot(y);
set(y3,'color','r','LineStyle','--');
y4=ezplot(h);
set(y4,'color','b','LineStyle',':');
title('Grafica de la función y su derivada');
legend('y=función','h=derivada');
xlabel('Eje x');ylabel('Eje Y');
hold off;


% FIN

PROGRAMA B


%PROGRAMA DE UNA FUNCION Y SUS DERIVADAS NULAS
% UNIVERSIDAD TÉCNICA DE AMBATO
% Facultad de Ingeniería Civil y Mecánica
% Carrera de Ingeniería Civil
% MÓDULO DE ECUACIONES DIFERENCIALES

% Cuarto Semestre - Paralelo "A" - Grupo N° 7
% Chimbo Farid,Robalino Mariela,Segura Katherine

%Grafica del Literal (b) de la Hoja 5
clear all
close all
clc
% Encontrar las derivadas no nulas de la siguientefunción

syms x;
y=(x*(2+3*x.^3)*(1+4*x.^2));

% Derivadas no nulas de la función

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);

figure(1);
h1=ezplot(y);xlabel('Eje x');ylabel('Eje Y');legend('y= función');grid;
set(h1,'color','m','LineStyle',':');

figure(2);
h2=ezplot(y1);xlabel('Eje x');ylabel('Eje Y');legend('y1= primeraderivada');grid;
set(h2,'color','r','LineStyle','-.');

figure(3);
h3=ezplot(y2);xlabel('Eje x');ylabel('Eje Y');legend('y2= Segunda derivada');grid;
set(h3,'color','k','LineStyle','--');

figure(4);
h4=ezplot(y3);xlabel('Eje x');ylabel('Eje Y');legend('y3= tercera derivada');grid;
set(h4,'color','g','LineStyle','-');

figure(5);
h5=ezplot(y4);xlabel('Eje x');ylabel('Eje Y');legend('y4= cuartaderivada');grid;
set(h5,'color','c','LineStyle',':');

figure(6);
h6=ezplot(y5);xlabel('Eje x');ylabel('Eje Y');legend('y5= quinta derivada');grid;
set(h6,'color','m','LineStyle','--');

figure(7);
h7=ezplot(y6);xlabel('Eje x');ylabel('Eje Y');legend('y6= sexta derivada');grid;
set(h7,'color','b','LineStyle','-.');

figure(8);
h8=ezplot(y7);xlabel('Eje x');ylabel('Eje Y');legend('y7= septimaderivada');grid;
set(h8,'color','K','LineStyle','-');

figure(9);
hold on;
h1=ezplot(y);
set(h1,'color','r','LineStyle',':');
h2=ezplot(y1);
set(h2,'color','g','LineStyle','-.');
h3=ezplot(y2);
set(h3,'color','m','LineStyle','-');
h4=ezplot(y3);
set(h4,'color','c','LineStyle','-');
h5=ezplot(y4);
set(h5,'color','k','LineStyle',':');
h6=ezplot(y5);
set(h6,'color','y','LineStyle','-');
h7=ezplot(y6);set(h7,'color','w','LineStyle','-.');
h8=ezplot(y7);
set(h8,'color','K','LineStyle','-');
title('Grafica de la función y las derivadas no nulas');
legend('y=función','y1= 1ra derivada','y2= 2da derivada','y3= 3ra derivada','y3= 3ra derivada','y4= 4ta derivada','y5= 5ta derivada','y6= 6ta derivada','y7= 7ma derivada');
xlabel('Eje x');ylabel('Eje Y');grid;
hold off;

figure(10);subplot(3,4,1);ezplot(y);set(ezplot(y),'color','r','LineStyle',':');xlabel('eje x ');ylabel( 'eje y');legend('y= función');grid;...
subplot(3,4,2);ezplot(y1);set(ezplot(y1),'color','k','LineStyle','-.');xlabel('eje x ');ylabel( 'eje y');legend('y1= 1ra derivada');grid;...
subplot(3,4,3);ezplot(y2);set(ezplot(y2),'color','r','LineStyle','--');xlabel('eje x ');ylabel( 'eje y');legend('y2=2da derivada');grid;......
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Mathlab
  • Mathlab
  • Mathlab
  • Manual de mathlab
  • Vibraciones En Mathlab
  • Mathlab
  • mathlab
  • Aplicaciones Matematicas En Mathlab

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS