clc;
clear all;
x= -2:0.1:2;
y= x.^2-3;
subplot(2,3,1);
plot(x,y,'r.');
xlabel('valores x');
ylabel('valores y');
x1=-1:10;
y1=x1;
subplot(2,3,2);
plot(x1,y1,'g*');
xlabel('valores x');
ylabel('valores y');
x2=linspace (-4,4,100);
y2= x2.^3+1;
subplot(2,3,3);
plot(x2,y2,'b-');
xlabel('valores x');
ylabel('valores y');
x3=linspace(-3,3,15);
y3=linspace(-3,13,17);
[x4,y4]=meshgrid(x3,y3);
z4=x4.^4+3*x4.^2-2*x4+6-2*y4.*x4.^2+y4.^2-2*y4;
subplot(2,3,4);
xlabel('valores x');
ylabel('valores y');
zlabel('valores de z');
[X,Y] = meshgrid(-8:.5:8);
M= sqrt(X.^2 + Y.^2) + eps;
Z = sin(M)./M;
surf(X,Y,Z);
subplot(2,3,5);
xlabel('valores x');
ylabel('valores y');
a=-2:0.1:2;
b=-3:0.1:3;
[A,B]=meshgrid(a,b);
C=A.^2-B.^2;
surf(A,B,C);
subplot(2,3,6);
xlabel('valores x');
ylabel('valores y');
zlabel('valores de z');
[xs1,ys1]=meshgrid(-8:0.1:8);
Rs1=sqrt(xs1.^2+ys1.^2)+eps;
zs1=sin(Rs1.^2)./Rs1;
subplot(2,3,6);
mesh(xs1,ys1,zs1)
xlabel('valores x');
ylabel('valores y');
zlabel('valores de z');
No hay comentarios:
Publicar un comentario