Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 28

Did you mean:

>> x = 0:0.1:2*2*pi;

>> y1=sin(x);

>> x1=0:0.1:3*pi;

>> y2=2*cos(x1);

>> plotyy(x,y1,x1,y2)

>>

..
>> x=0.1:0.1:10;

y =2*x+3;

>> loglog(x,y)

>> x=0.1:0.1:10;

y =2*x+3;

>> loglog(x,y)

>> semilogx(x,y)
..

>> x=0.1:0.1:10;

y =2*x+3;

>> loglog(x,y)

>> semilogx(x,y)

>> semilogy(x,y)

subplot(2,2,2)
..

>> x=0.1:0.1:10;

y =2*x+3;

loglog(x,y)

semilogx(x,y)

semilogy(x,y)

>> subplot(2,2,2)

>> semilogx(x,y)

>> subplot (2,2,3)

>> semilogy(x,y)

>> subplot(2,2,4)

>> plot(x,y)

>> x=0:pi/20:2*pi;

>> subplot(2,1,1);

>> plot(x,sin(x))

>> subplot(2,1,2)

>> plot(x,sin(2*x))
..

X=0:50;

y = 5*x.^2 + 1;

>> plot(x,y)

>> x=0:0.5:50;
>> y=5*x.^2;

>> subplot(2,2,1)

>>

>> x=0:0.5:50;

>> y=5*x.^2;

>> subplot(2,2,1)

>> plot(x,y)

> x=0:0.5:50;

>> y=5*x.^2;

>> subplot(2,2,1)

>> plot(x,y)

>> title('Polinomial-lineal-lineal')

>> x=0:0.5:50;

>> y=5*x.^2;

>> subplot(2,2,1)

>> plot(x,y)

>> title('Polinomial-lineal-lineal')

>>

>> ylabel('y'),grid
..

>> x=0:0.5:50;

>> y=5*x.^2;

>> subplot(2,2,1)

>> plot(x,y)

>> title('Polinomial-lineal-lineal')

>>

>> ylabel('y'),grid

>> subplot(2,2,2)
>> semilogy(x,y)

>> x=0:pi/100:pi;

>> y=sin(x);

>> polar(x,y)

>>
>> x=0:pi/100:pi;

>> y=sin(x);

>> polar(x,y)

>> title('Funcion seno')


>> tetha=linspace(-pi,pi,100);

>> r=2-4*cos(tetha);

>> polar(tetha,r)

>> polar(x,y)

>>

>> polar(x,y)

..
>> t=0:0.05:2*pi;

>> r=sin(2*t).*cos(2*t);

>> polar(t,r,'--r')

>>
..

>> fplot('sin(x)',[-2*pi,2*pi])

..

fplot('sin(x)',[-2*pi,2*pi])

>> fplot('x^2',[-2 3],'g-.')


Definir escalas para el eje y

fplot('sin(x)',[-2*pi,2*pi])

>> fplot('x^2',[-2 3],'g-.')

>> fplot('5*x+3',[-3 3,-4 4],'b:')


Crear ventanas para graficas

>> fplot('sin(x)',[-2*pi,2*pi])

>> figure(2)
.

Comando

ezplot()

>> ezplot('x^2')
..

>> ezplot('x^2+y^2-64',[-10 12 -12 10])


GRAFICOS DE BARRAS

Definir el vector

> Y=[15 4 5 8 19 10 15 8 17];

graficar

>> subplot(2,2,1)

Y=[15 4 5 8 19 10 15 8 17];

>> subplot(2,2,1)

>> bar(Y)
PONER TITULOS

> Y=[15 4 5 8 19 10 15 8 17];

>> subplot(2,2,1)

>> bar(Y)

>> title('Barras Verticales')

>> subplot(2,2,2)

>> barh(Y)

>> title('Barras horizontales')


>> Y=[15 4 5 8 19 10 15 8 17];

>> subplot(2,2,1)

>> bar(Y)

>> title('Barras Verticales')

>> subplot(2,2,2)

>> barh(Y)

>> title('Barras horizontales')

>> subplot(2,2,3)

>> bar3(Y)

>> title('barras verticales 3D')


..

>> bar(Y)

>> title('Barras Verticales')

>> subplot(2,2,2)

>> barh(Y)

>> title('Barras horizontales')

>> subplot(2,2,3)

>> bar3(Y)

>> title('barras verticales 3D')

>> subplot(2,2,4)
>> bar3h(Y)

>> title('Barras horizontales 3D')

CUADO LOS DATPOS SON UNA MATRIZ

1 DEFINIOS EL VECTOR Y

>> y=[0 1 0 0 1]

y=

0 1 0 0 1
>> ni=[20 30 15 40 10]

ni =

20 30 15 40 10

>> pie(ni)

x=0:10;
y=0.5*(x+1).^2;
z=(x+y).^(1/4);
plot3(x,y,z,':r*').
grid on

x2=0:5;
y2=50-(x2+1).^2;
z2=(x.^2+y2.^2);
z2=(x2.^2+y2.^2).^(1/4);
hold on
plot3(x2,y2,z2.'--bd')

You might also like