Trabajo De Matlab

Páginas: 15 (3741 palabras) Publicado: 13 de septiembre de 2011
GUÍA DE RESOLUCIÓN DE EJERCICIOS MEDIANTE APLICAIÓN DE MATLAB.
1)
2) Formato long:
>> format long
a) >> x=pi^2-1
x = 8.86960440108936
b) >> x=exp(5)
x= 1.484131591025766e+002
c) >> x=sin(5*pi/3)
x = -0.86602540378444
Formato short:
>> format short
a) >> x=pi^2-1
x = 8.8696
b) >> x=exp(5)x = 148.4132
c) >> x=sin(5*pi/3)
x = -0.8660

3) Cálculo de raíces
d) >> solve('x+sqrt(25-x^2)=7')
ans = [ 3] [ 4]
e) >> solve('x^2+x^3=9*(x+1)')
ans = [ -3] [ 3] [ -1]

4) Gráficas
f) >> x=0:0.1:1;
>> y=x.^5+3*x+5;
>> plot(x,y,'-*m')
>> xlabel('x')>> ylabel('y')
>> title('Grafica a')
>> grid

g) >> x=-4*pi:0.1:4*pi;
>> y=exp(2*x).*sin(9-x.^2);
>> plot(x,y,'-m')
>> xlabel('x')
>> ylabel('y')
>> title('Grafica b')
>> grid

h) >> t=0:0.1:4*pi;
>> x=t-sin(t);
>> plot(t,x,'-*m')
>> xlabel('t')>> ylabel('f(t)')
>> title('Grafica c')
>> grid
>> y=t-cos(t);
>> hold on
>> plot(t,y,'-*c')

5) Gráficas
>> x=0:0.01:0.5;
>> y=tan(x);
>> subplot(2,2,1),plot(x,y,'-*m')
>> grid
>> title('y=tan x')
>> x=0:0.1:10;
>>y=cos(5*x);
>> subplot(2,2,2),plot(x,y,'-*m')
>> grid
>> title('y=cos 5x')
>> x=2:0.01:5;
>> y=log(x-1);
>> subplot(2,2,3),plot(x,y,'-*m')
>> grid
>> title('y=log(x-1)')
>> x=0:0.1:pi;
>> y=exp(x)+5*sin(2*x);
>> subplot(2,2,4),plot(x,y,'-*m')
>> grid
>> title('y=e^x+5sen 2x')

6) Gráfica logarítmica>> syms x
>> ezplot(x^2)

Gráfica semilogarítmica

Aquí las gráficas se hicieron trabajando con la variable simbólica y modificando la escala de los ejes en “Edit-Axes Properties”.
Otra forma es usando los comandos loglog() y semilogy():
a)
b) >> x=0:0.1:10;
>> y=x.^2;
>> plot(x,y,'-b')
>> loglog(x,y)
>> grid
c) >>x=-10:0.1:10;
>> y=x.^2;
>> plot(x,y,'-b')
>> semilogy(x,y)
>> grid

7) Límites
i) >> syms x
>> limit((x^2-7*x+12)/(2*x-6),x,3)
ans = -1/2
j) >> syms x
>> limit((sqrt(4+x)-2)/x,x,0)
ans = 1/4

8) Derivadas.
a) >> syms x
>> diff(x^2-1,x)
ans = 2*x>> f=ans
f = 2*x
>> subs(f,x,0)
ans = 0

b) >> syms x
>> diff(x^3/(x^2-1),x)
ans = 3*x^2/(x^2-1)-2*x^4/(x^2-1)^2
>> g=ans
g = 3*x^2/(x^2-1)-2*x^4/(x^2-1)^2
>> subs(g,x,1)
ans = NaN

9) Evaluación de una función en un punto.
k) >> syms x
>> f=diff(x^2-1,x)
f = 2*x
>> subs(f,x,2)
ans = 4
l) >> symsx
>> f=diff(x^3/(x^2-1),x)
f = 3*x^2/(x^2-1)-2*x^4/(x^2-1)^2
>> subs(f,x,2)
ans = 0.4444

10) Integrales
a) >> syms x
>> int (log(x)/sqrt(x),x)
ans = 2*x^(1/2)*log(x)-4*x^(1/2)

b) >> syms x
>> int (atan(x),x)
ans = x*atan(x)-1/2*log(x^2+1)

GUÍA DE TRABAJOS PRÁCTICOS Nº 1.
RESOLUCIÓN DE PROBLEMAS MEDIANTE APLICACIÓN DE MATLAB
1.2. Archivo .m:
P=input('P(kPa)= ');
V=input('V(L)= ');
R=input('R(kPa*L/mol*K)= ');
T=input('T(K)= ');
M=input('M(g/mol)= ');
n=(P*V)/(R*T);
m=n*M

Hoja de comandos:
P(kPa)= 100
V(L)= 100000
R(kPa*L/mol*K)= 8.314472
T(K)= 300
M(g/mol)=...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Trabajo Matlab
  • Matlab Área de trabajo
  • Trabajo Ecuaciones Matlab
  • Trabajo De Computacion Polinomio De La Grange En Matlab
  • Trabajo De Matlab Para Registros De Pozos
  • Trabajo de matlab
  • Trabajo practico matlab
  • Trabajo Matlab Optoelectronica

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS