1 / 19

Métodos de Graficación en Matlab

Métodos de Graficación en Matlab. Lic. Gabriel Arcos. Graficación. Pasos a seguir. x = 0:0.2:12; y1 = bessel(1,x); y2 = bessel(2,x); y3 = bessel(3,x);. Preparar los datos. Abrir ventana y configurar. figure(1). Ejecutar comando gráfico. h = plot(x,y1,x,y2,x,y3);. Cambiar propiedades

risa
Download Presentation

Métodos de Graficación en Matlab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Graficación. Pasos a seguir. x = 0:0.2:12; y1 = bessel(1,x); y2 = bessel(2,x); y3 = bessel(3,x); Preparar los datos 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. Cambiar las propiedades del eje de coordenadas axis([0 12 -0.5 1]) grid on 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

  4. Graficación. Pasos a seguir. 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') 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

  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; f = figure(’Color’,’white’… ’Renderer’,’OpenGL’… ’DoubleBuffer’,’on’); set(f,’Color’,’white’) set(f,’Renderer’,’OpenGL’) set(f,’Renderer’,’painters’) set(f,’Renderer’,’zbuffer’) set(f,’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 Patch Surface

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

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

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

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

  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 print –deps2c –r300 myplot Built-in MATLAB Drivers: Formato Postscript: -dps, -dpsc, -dps2, -dpsc2. Formato EPS: -deps, -depsc, -deps2, -depsc2 Otros Formatos: -djpeg<nn>, -dtiff, -dpng

More Related