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

REALIZAR FUNCIONES EN MATLAB

>> U=[3 0 5 4];V=[0 0 1 2];

>> plot(U,V)

>> U=[3 0 5 -4];V=[0 0 -1 2];

>> plot(U,V)

>> x=[0 1 2 3]; y=[0 1 2 3];

>> plot(x,y)

>> x=[0 1 2 3]; y=[0 1 2 3];%(0,0);(1,1);(2;2);(3;3)

>> x=[0 1 2 3]; y=[0 -1 -2 -3];

>> plot(x,y)

>> x=[0 11 2 3]; y=[0 -10 -2 -3];

>> plot(x,y)

>>

Grafica de la función seno

>> %Grafica de Funciones

>> x=-2*pi:1:2*pi;

>> y=sin(x);

>> plot(x,y)

>> x=-2*pi:0.5:2*pi;

>> y=sin(x);

>> plot(x,y)

x=-2*pi:0.1:2*pi;

>> y=sin(x);

>> plot(x,y)

>> x=-2*pi:0.1:2*pi;
>> y=sin(x);

>> plot(x,y,'g')

>> plot(x,y,'r')

>> plot(x,y,'p')

>> plot(x,y,'b')

>> plot(x,y,'w')%color de la línea

Funciones Parametricas

>> %Funciones Parametricas

>>t=0:2*pi/100:2*pi;

>> x=sin(2*t);

>> y=sin(3*t);

>> plot(x,y)

MESHGRID (GENERA SUPERFICIES)

>> [x y]=meshgrid(-4:0.2:4);

>> z=y.^2/16-x.^2/9;

>> mesh(x,y,z)

You might also like