Vous êtes sur la page 1sur 4

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq wertyuiopasdfghjklzxcvbnmqwertyui TAREA 1 opasdfghjklzxcvbnmqwertyuiopasdfg INTRODUCCION A MATLAB hjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmq wertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfg hjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmq

wertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfg hjklzxcvbnmrtyuiopasdfghjklzxcvbn mqwertyuiopasdfghjklzxcvbnmqwert yuiopasdfghjklzxcvbnmqwertyuiopas


28/02/2011 JORGE ISAAC OLVERA AMEZCUA

1. Considere los nmeros 1, 2,3 para usarse como componentes de un vector columna y como componentes de un vector rengln. Vector columna. Vector rengln.

>> a= [1; 2; 3] >>b= [1, 2, 3] a= 1 b= 1 2 3 2 3 2. Cul es el comando para crear una matriz de 5x5 con unos en la diagonal y ceros en el resto de los componentes. >> eye (5) ans = 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1

3. Considere las matrices A y B, calcule su producto arreglo y su producto matricial. >> A= [8 7 11; 6 5 -1; 0 2 -8] A= 8 7 11 6 5 -1 0 2 -8 >> B= [2 1 2;-1 6 4; 2 2 2] B= 212 -1 6 4 222 Producto matricial >> A= [8 7 11; 6 5 -1; 0 2 -8]; B= [2 1 2;-1 6 4; 2 2 2]; >> C= a.*b C= 16 -6 0 7 22 30 -4

4 -16

4. Encuentre la magnitud del vector >> D= [-1, 7, 3,2] D= -1 7 3 2

>>MAG (D) mag = -1 7 3 2

MAGNITUD DE UNA RAIZ CUADRADA >> MAG= sqrt(D) MAG = Columns 1 through 2 0 + 1.0000i 2.6458 Columns 3 through 4 1.7321 1.4142

5. Use matlab para calcular el seno de pi/3 expresado como un nmero racional. >> x= pi/3 x= 1.0472 >> format rat >> sin(x) ans = 1170/1351 6. si el volumen de un cilindro de altura h y radio r esta dado por v=pi * r 2 *h , use matlab para encontrar el volumen de un cilindro de 12cm de altura y 4cm de dimetro >> format short >> r=2 r= 2

>> h=12 h= 12 >> V=pi*r^2*h V= 150.7964 7. use matlab para expresar los siguientes nmeros a) 91.25 >> x= 9^1.25 x= 15.5885 b) 5 + 11/4 >> y= 5+(11/4) y= 7.7500 8. crear un archivo m de matlab para calcular :Sen(pi/4;pi/3;pi/2) % script file sin.m to compute senoidal of a set of numbers x1 = [pi/4] y1 = sin(x1) x2 = [pi/3] y2 = sin(x2) x3 = [pi/2] y3 = sin(x3) Luego guardamos el archivo como sin.m y lo aplicamos en command window >> sin x1 = 0.7854 y1 = 0.7071 x2 = 1.0472 y2 = 0.8660 x3 = 1.5708 y3 = 1

Vous aimerez peut-être aussi