8/16/2019 Tarea_gráficas2D en MATLAB
1/11
Ing. Luis Villacís, MSc.Matemática IV
Quito-Ecuador 2016
8/16/2019 Tarea_gráficas2D en MATLAB
2/11
GRÁFICAS D EN MATLAB
x=[2 4 5 7 8 10 11]; y=[4 -5 6 7 -2 0 6];
plot(x,y)grid on
plot
8/16/2019 Tarea_gráficas2D en MATLAB
3/11
GRÁFICAS D EN MATLAB
x=1:1:5y=x.^2;plot(x,y, '*k' )
plot
8/16/2019 Tarea_gráficas2D en MATLAB
4/11
x=-10:0.01:10; y=sin(x)-cos(x);plot(x,y)grid on
plot
GRÁFICAS D EN MATLAB
8/16/2019 Tarea_gráficas2D en MATLAB
5/11
x=-1.5:0.1:1.5; y=x.^2;z=exp(-x.^2);plot(x,y,'r','LineWidth',2)hold onplot(x,z,'b','LineWidth',2)hold off grid onxlabel('eje x')
ylabel('eje y')title('Gráficas en MATLAB')
legend('función cuadrática','campana de Gauss‘
plot
8/16/2019 Tarea_gráficas2D en MATLAB
6/11
x=0:0.25:10; y=sin(x);plot(x,y,'*r')grid on
plot
8/16/2019 Tarea_gráficas2D en MATLAB
7/11
x=linspace(-3,3,80); y=exp(-x.^2);z=2*exp(-x.^2);plot(x,y,'+',x,z,'o‘)title('Campanas de Gauss')xlabel('Eje de Abscisas‘)
ylabel ('Eje de Ordenadas‘)legend('exp(-x^2)', '2*exp(-x^2)')
plot
8/16/2019 Tarea_gráficas2D en MATLAB
8/11
x=-2:0.01:2; y=(x.^2).*(x
8/16/2019 Tarea_gráficas2D en MATLAB
9/11
8/16/2019 Tarea_gráficas2D en MATLAB
10/11
Grafique las siguientes funciones en el mismo ejecoordenadas para valores de x desde −2 has
seleccione el espaciamiento más adecuado para creuna gráfica suave: x x y 3cos)3sin(1 x x y 4cos)2sin(2
x x y 2cos)4sin(3 Ajuste la gráfica creada de modo que la gráfica 1 searoja y rayada, la gráfica 2 sea azul y continua y lagráfica 3 sea verde y punteada. Agregue título leyenda, además de cuadrícula.
8/16/2019 Tarea_gráficas2D en MATLAB
11/11
TAREA: Escriba el código necesario para presensiguiente esquema de gráficas usando el comando
Top Related