La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Métodos de Graficación en Matlab Lic. Gabriel Arcos.

Presentaciones similares


Presentación del tema: "Métodos de Graficación en Matlab Lic. Gabriel Arcos."— Transcripción de la presentación:

1 Métodos de Graficación en Matlab Lic. Gabriel Arcos

2 Graficación. Pasos a seguir. Preparar los datos x = 0:0.2:12; y1 = bessel(1,x); y2 = bessel(2,x); y3 = bessel(3,x); Abrir ventana y configurar figure(1) Ejecutar comando gráfico h = plot(x,y1,x,y2,x,y3); Cambiar propiedades del objeto gráfico set(h,'LineWidth',2)

3 Graficación. Pasos a seguir. Agregar etiquetas y texto xlabel('Time')ylabel('Amplitude')legend(h,'First','Second','Third') title('Bessel Functions') [y,ix] = min(y1); text(x(ix),y,'First Min \rightarrow',... 'HorizontalAlignment','right') Exportar el gráfico print -depsc -tiff -r200 myplot Cambiar las propiedades del eje de coordenadas axis([0 12 -0.5 1]) grid on

4 Graficación. Pasos a seguir. x = 0:0.2:12; y1 = bessel(1,x); y2 = bessel(2,x); y3 = bessel(3,x); figure(1) h = plot(x,y1,x,y2,x,y3); set(h,'LineWidth',2) axis([0 12 -0.5 1]) grid on xlabel('Time')ylabel('Amplitude')legend(h,'First','Second','Third') title('Bessel Functions') [y,ix] = min(y1); text(x(ix),y,'First Min \rightarrow',... 'HorizontalAlignment','right')

5 Funciones de una variable Graficar: x = 0:0.05:2*pi; y = sin(x); plot(x,y,’b-’)

6 Curvas Paramétricas Graficar las curvas: t=-100:.05:100;x=t;y=(2*t)./(1+t.^2);z=(1-t.^2)./(1+t.^2);plot3(x,y,z,'b-')

7 Funciones de dos variables Graficar: [X,Y] = meshgrid(-3:.125:3); Z = peaks(X,Y); mesh(X,Y,Z)

8 Funciones de dos variables Graficar: [X,Y] = meshgrid(-3:.125:3); Z = peaks(X,Y); surf(X,Y,Z)

9 Curvas implícitas Graficar: [x,y] = meshgrid(-1.5:0.1:1.5); v =(x.^4)+(y.^4)+2*(x.^2).*(y.^2)-2*(x.^2)+2*(y.^2)+1; contour(x,y,v,[1 1])

10 Superficies implícitas Graficar: [x,y,z] = meshgrid(-1.5:0.1:1.5); v =x.^2+y.^2-z; patch(isosurface(x,y,v,[1 1]),… ’FaceColor’,’blue’)

11 Configuración de la ventana f = figure; set(f,’Color’,’white’) set(f,’Renderer’,’OpenGL’) set(f,’DoubleBuffer’,’on’) set(f,’Renderer’,’painters’)set(f,’Renderer’,’zbuffer’) f = figure(’Color’,’white’… ’Renderer’,’OpenGL’…’DoubleBuffer’,’on’);

12 Configuración del eje de coordenadas axis([0 1 0 1]) set(gca,’Color’,’yellow’) axis([0 1 0 1 0 1]) grid on

13 Propiedades de objetos gráficos Line Surface Patch

14 Color LineStyle: [ {-} | -- | : | -. | none ] LineWidth Marker: [ + | o | * |. | x | square | diamond | v | ^ | > | < | pentagram | hexagram | {none} ] MarkerSize XData YData ZData x=0:.05:2*pi; y=sin(x); h=plot(x,y); set(h,’Propiedad’,valor) set(h,'Color','black','LineWidth',3)

15 Propiedades de objetos gráficos EdgeAlpha EdgeColor FaceAlpha FaceColor LineStyle: [ {-} | -- | : | -. | none ] LineWidth Marker: [ + | o | * |. | x | square | diamond | v | ^ | > | < | pentagram | hexagram | {none} ] MarkerSize SURFACE Y PATCH:

16 Propiedades de objetos gráficos set(h,'FaceColor','yellow','EdgeColor','black')

17 Definir el punto de vista view(30,30) view([1 1 1])

18 Agregar iluminación [x,y,z]=meshgrid(-1.5:.1:1.5); v=x.^2+y.^2-z; h=patch(isosurface(x,y,z,v,1),… 'FaceColor','blue','EdgeColor','none'); view([1 1 1]) lighting gouraud light

19 Exportar el gráfico Built-in MATLAB Drivers: Formato Postscript: -dps, -dpsc, -dps2, -dpsc2. Formato EPS: -deps, -depsc, -deps2, -depsc2 Otros Formatos: -djpeg, -dtiff, -dpng print –deps2c –r300 myplot


Descargar ppt "Métodos de Graficación en Matlab Lic. Gabriel Arcos."

Presentaciones similares


Anuncios Google