Está en la página 1de 4

>> title('gráfica de barras')

>>

>>

>>

>> stairs(x,y)

>> title('Gráfica Escalonada')

>>

>>

>>

>> x=-2.9:0.2:2.9;

>> y=randn(5000,1)% crea 5000 puntos aleatorios

y=

>> hist(y,x)

>> title('Histograma de datos gaussianos')

>>

>>

>>

>>

>> y=randn(50,1);

>> stem(y,':')% dinuja una gráfica stem con linea punteada

>> title('Gráfica stem de datos aleatorios')

>>

>> t=0:pi/50:10*pi;

>> plot3(sin(t),cos(t9,t)

??? plot3(sin(t),cos(t9,t)

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.


>> plot3(sin(t),cos(t),t)

>> title('Helice'),xlabel('sin(t)'),ylabel('cos(t)'),zlabel('t')

>>

>>

>> clf

>> axes('position',[.1.1.8.6])

??? axes('position',[.1.1.8.6])

Error: Unexpected MATLAB expression.

>> axes('position',[.1 .1 .8 .6])

>> mesh(peaks(20));

>> axes('position',[.1 .7 .8 .2]

??? axes('position',[.1 .7 .8 .2]

Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.

>> axes('position',[.1 .7 .8 .2])

>> pcolor([1:10;1:10]);

>>

>>

>>

>> %gráficos de malla y de superficie

>> x=-7.5:.5:7.5;

>> y0x

??? Undefined function or variable 'y0x'.

>> y=x

y=
Columns 1 through 10

-7.5000 -7.0000 -6.5000 -6.0000 -5.5000 -5.0000 -4.5000 -4.0000 -3.5000 -3.0000

Columns 11 through 20

-2.5000 -2.0000 -1.5000 -1.0000 -0.5000 0 0.5000 1.0000 1.5000 2.0000

Columns 21 through 30

2.5000 3.0000 3.5000 4.0000 4.5000 5.0000 5.5000 6.0000 6.5000 7.0000

Column 31

7.5000

>> [X,Y]=meshgrid(x,y);

>> R=sqrt(X.^2+y.^2)+eps;%distancia desde el origen (0,0)

??? Error using ==> plus

Matrix dimensions must agree.

>> R=sqrt(X.^2+.^2)+eps;%distancia desde el origen (0,0)

??? R=sqrt(X.^2+.^2)+eps;%distancia desde el origen (0,0)

Error: Unexpected MATLAB operator.

>> R=sqrt(X.^2+Y.^2)+eps;%distancia desde el origen (0,0)

>> Z=sin(R)./R;

>> mesh(X,Y,Z)

>>
>>

>>

>> surf(X,Y,Z)

>>

>>

>> mesh(peaks)

>> title('Gráfica Mesh de la función Peaks')

>>

>>

>> [X,Y,Z]=peaks;

>> contour(x,y,z,20)%genera 20 contornos 2-D

??? Undefined function or variable 'z'.

>> contour(X,Y,Z,20)%genera 20 contornos 2-D

>>

>>

>> contour3(X,Y,Z,20)% la misma gráfica 3-D

>> axis([-3 3 -3 3 -6 8])

>>

También podría gustarte