ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Ejemplos De Graficas En MATLAB


Enviado por   •  4 de Septiembre de 2014  •  320 Palabras (2 Páginas)  •  259 Visitas

Página 1 de 2

x =-1:.1:3;

y = 1:.1:4;

[x,y] = meshgrid(x,y);

z = sin(2*x.^2+24).* cos(y.^.5+2);

surfc(x,y,z)

xlabel('x')

ylabel('y')

zlabel('z')

grid on

x =-1.5:.1:3;

y = .5:.1:4;

[x,y] = meshgrid(x,y);

z = sin(2*x.^2+24)./ cos(2*y);

surfl(x,y,z)

xlabel('x')

ylabel('y')

zlabel('z')

grid on

f= @ (x) sin(x);

x= [0:0.1:5];

y= f(x);

plot (x,y,'linewidth',3);

grid on

hold on

f= @ (x) cos(x)+2;

x= [0:0.1:5];

y= f(x);

plot (x,y,'r','linewidth',2.5);

x =linspace(0,2*pi,20);

y = (1+sin(x)) .*cos(x.^3);

[x,y] = cylinder(y);

surf(x,y,z);

axis square

xlabel('x')

ylabel('y')

zlabel('z')

grid on

x=[80 50 60 25 100 15];

explode= [1 1 1 1 1 1];

pie3(x,explode)

legend('Videjuegos','Musica',

'Amigos','Otros','Anime','Escuela')

title('Mi grafica de Importancia')

Y= [2 6.5 7; 3 5.5 7;4 6 7;3 5 7;2 3 7; 1 2 7];

bar3(Y)

f= @ (x) x.^2 +2

x= [-5:0.1:5]

y= f(x)

plot (x,y,'g','linewidth',3.5)

grid on

f= @ (x) sin (34*x) + 54;

x= (-3:0.1:3);

y= f(x);

plot (x,y,'r');

f= @ (x) (tan(4*x) + 96)/2;

x= (-20:1:20);

y= f(x)

plot (x,y,'-p')

legend ('Tangente')

f= @ (x) x.^4 + 76 .* (-2*x);

x= [-2:0.1:10];

y= f(x)+2;

plot (x,y,'linewidth',2.5)

legend('sonrix')

n = 4;

R = 1;

tita = [0:(2*pi/n):2*pi];

x = R*cos(tita);

y = R*sin(tita);

figure(1)

plot(x,y,'-b')

axis equal

axis([-1.5 1.5 -1.5 1.5])

set(gca,'XTick',[-1.5:0.5:1.5])

set(gca,'XTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'YTick',[-1.5:0.5:1.5])

set(gca,'YTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'Fontsize',10)

grid on

hold on

n = 120;

R = 1;

tita = [0:(2*pi/n):2*pi];

x = R*cos(tita);

y = R*sin(tita);

figure (1)

plot(x,y,'-b')

axis equal

axis([-1.5 1.5 -1.5 1.5])

set(gca,'XTick',[-1.5:0.5:1.5])

set(gca,'XTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'YTick',[-1.5:0.5:1.5])

set(gca,'YTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'Fontsize',10)

n = 3;

R = 1;

tita = [0:(2*pi/n):2*pi];

x = R*cos(tita);

y = R*sin(tita);

figure(1)

plot(x,y,'-b')

axis equal

axis([-1.5 1.5 -1.5 1.5])

set(gca,'XTick',[-1.5:0.5:1.5])

set(gca,'XTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'YTick',[-1.5:0.5:1.5])

set(gca,'YTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'Fontsize',10)

grid on

n = 8;

R = 1;

tita = [0:(2*pi/n):2*pi];

x = R*cos(tita);

y = R*sin(tita);

figure(1)

plot(x,y,'-b')

axis equal

axis([-1.5 1.5 -1.5 1.5])

set(gca,'XTick',[-1.5:0.5:1.5])

set(gca,'XTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'YTick',[-1.5:0.5:1.5])

set(gca,'YTickLabel',{'-1.5','-1.0','-0.5','0.0','0.5','1.0','1.5'})

set(gca,'Fontsize',10)

grid on

hold on

n = 6;

R = 1;

tita = [0:(2*pi/n):2*pi];

x = R*cos(tita);

y = R*sin(tita);

figure (1)

plot(x,y,'-b')

axis equal

...

Descargar como (para miembros actualizados) txt (6 Kb)
Leer 1 página más »
Disponible sólo en Clubensayos.com