You are on page 1of 6

» t=0:pi/10:2*pi; » y2=sin(t-0.

25);

» [X,Y,Z]=cylinder(4*cos(t)); » y3=sin(t-0.5);

» t=-pi:pi/100:pi; » plot(t,y,t,y2,t,y3);

» y=sin(t); » xlabel('-\pi \leq {\itt} \leq \pi');

» plot(t,y); » ylabel('sin(t)');

» axis([-pi pi -1 1]); » axis([-pi pi -1 1]);

» xlabel('-\pi \leq {\itt} \leq \pi');

» ylabel('sin(t)');

» title('Graph of the sine function');

» text(1,-1/3,'\it{note the odd symetry}');


x=[-3:0.2:3]; >> x=-10:.1:-5;

y=x; >> y=2+sin(x);

[X,Y]=meshgrid(x,y); >> z=-5:.1:2;

Z=test3d(X,Y); >> t=exp(z);

figure(gcf), mesh(Z), pause(5), surf(Z) >> u=2:.1:10;

» u=-8:0.5:8; v=u; >> v=log(u.^2+1);

» [U,V]=meshgrid(u,v); >> plot(x,y,z,t,u,v)

» R=sqrt(U.^2+V.^2)+eps; >> grid on

» W=sin(R)./R; >> xlabel(’x’),


ylabel(’f(x)’)
» mesh(W)
>> title(’Representacion grafica de una funcion definida a trozos’)
>> x=-2*pi:.1:2*pi;

>> y=sin(x)-cos(sqrt(2)*x);

>> plot(x,y,’r’,’linewidth’,2)

>> axis tight

>> grid on

>> xlabel(’eje x’)

>> ylabel(’eje y’)

>> title(’Grafica de y=sin(x)-cos(sqrt(2)*x)’,’FontSize’,14)

> x=-5:0.5:5;

>> y=sin(x)-cos(x).^2;

>> plot(x,y)

>>xlabel(‘x’)

>>ylabel(‘y’)

>>grid on
>>a=-5:0.5:5;

>> x=-5:0.1:5; >> n=1:10;

>> y=sin(x)-cos(x).^2; >> m=1./n;

>> plot(x,y) >> plot(n,m,’.’)

>>xlabel(‘x’) >> plot(n,m,’o’)

>>ylabel(‘y’) >> help plot

>>grid on >>nlabel(‘x’)
>>mlabel(‘y’) >> ylabel(’eje y’)

>> x=- [0, 10]


>> x=,[-4 4 -4 4])
>> y=exp(sen(x))
>> y=’exp(sin(x))-1’
>> plot(x,y,’r’,’linewidth’,2)
>> plot(x,y,’r’,’linewidth’,2)
>> axis tight
>> axis tight
>> grid on
>> grid on
>> xlabel(’eje x’)
>> xlabel(’eje x’)

>> ylabel(’eje y’)

> ezplot(’x^2+2*x*y-3*x+1’,[-4 4 -4 4])

You might also like