Quiz Matlab

Páginas: 4 (811 palabras) Publicado: 12 de marzo de 2013
Quiz 3
1. Genera una grafica de la función tangente en 0 ≤x ≤1 etiquetando los ejes x y y. Establecer un incremento 0.1
>> x=[0:0.1:1]
x =
Columns 1 through 9

0 0.10000.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000
Columns 10 through 11
0.9000 1.0000
>> y=tan(x)
y =
Columns 1 through 9
0 0.1003 0.20270.3093 0.4228 0.5463 0.6841 0.8423 1.0296
Columns 10 through 11
1.2602 1.5574
>> plot(x,y), xlabel('x'), ylabel('tan(x)')
>>

2. Mostrar en la mismagrafica, con el sen(x) que se añade a la grafica como segunda curva.
>> z=sin(x)
z =
Columns 1 through 9
0 0.0998 0.1987 0.2955 0.3894 0.4794 0.5646 0.64420.7174
Columns 10 through 11
0.7833 0.8415
>> plot(x,y,x,z), xlabel('x'), ylabel('x')
>>

3. Crear un vector fila de puntos de datos para representar -π ≤x ≤ π conun incremento de 0.2. Representar la misma línea con linspace con 100 puntos y con 50 puntos.
>> x=[-pi:0.2:pi]
x =
Columns 1 through 9
-3.1416 -2.9416 -2.7416 -2.5416 -2.3416-2.1416 -1.9416 -1.7416 -1.5416
Columns 10 through 18
-1.3416 -1.1416 -0.9416 -0.7416 -0.5416 -0.3416 -0.1416 0.0584 0.2584
Columns 19 through 27
0.45840.6584 0.8584 1.0584 1.2584 1.4584 1.6584 1.8584 2.0584
Columns 28 through 32
2.2584 2.4584 2.6584 2.8584 3.0584
x=linspace(-pi,pi)
x =
Columns 1 through 9-3.1416 -3.0781 -3.0147 -2.9512 -2.8877 -2.8243 -2.7608 -2.6973 -2.6339
Columns 10 through 18
-2.5704 -2.5069 -2.4435 -2.3800 -2.3165 -2.2531 -2.1896-2.1261 -2.0627
Columns 19 through 27
-1.9992 -1.9357 -1.8723 -1.8088 -1.7453 -1.6819 -1.6184 -1.5549 -1.4915
Columns 28 through 36
-1.4280 -1.3645 -1.3011 -1.2376...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Quiz capitulo 7 matlab demystified
  • Quiz
  • quiz
  • Quiz
  • Quiz
  • Quiz No
  • Quiz
  • Quiz

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS