Es un espacio donde publico notas que creo interesantes desde octubre de 2007.
jueves, 29 de abril de 2010
martes, 27 de abril de 2010
domingo, 24 de enero de 2010
lunes, 11 de enero de 2010
Un robot creado en Matlab
%% Creado por Pérez del Razo Marco
for i=0:3
clf
matriz_0=[0,0,0,0,0,3,3,0,0,3,3,0,3,3,3,3;0,0,1,1,0,0,1,1,1,1,0,0,0,0,1,1;0,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1]
matriz_1=[0,0,-1,-1,0,0,0,-1,-1,0,-1,-1,-1,-1,0,0;0,1,1,0,0,0,1,1,0,0,0,0,1,1,1,1;0,0,0,0,0,-3,-3,-3,-3,-3,-3,0,0,-3,-3,0]
x=matriz_0(1,:)
y=matriz_0(2,:)
z=matriz_0(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
for i=0:45
clf
theta = -(i * pi)/180
matriz_y=[cos(theta),0,sin(theta);0,1,0;-sin(theta),0,cos(theta)]
a=matriz_y*matriz_0
x=a(1,:)
y=a(2,:)
z=a(3,:)
plot3(x,y,z)
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
pause(0.030)
end
pause(0.5)
for i=0:90
clf
theta = (i * pi)/180
matriz_z=[cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1]
b=matriz_z*a
x=b(1,:)
y=b(2,:)
z=b(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
poste=matriz_z*matriz_1
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = -(i * pi)/180
matriz_x=[1,0,0;0,cos(theta),-sin(theta);0,sin(theta),cos(theta)]
c=matriz_x*b
x=c(1,:)
y=c(2,:)
z=c(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = (i * pi)/180
matriz_x=[1,0,0;0,cos(theta),-sin(theta);0,sin(theta),cos(theta)]
d=matriz_x*c
x=d(1,:)
y=d(2,:)
z=d(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:90
clf
theta = -(i * pi)/180
matriz_z=[cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1]
e=matriz_z*d
x=e(1,:)
y=e(2,:)
z=e(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
poste1=matriz_z*poste
x=poste1(1,:)
y=poste1(2,:)
z=poste1(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = (i * pi)/180
matriz_y=[cos(theta),0,sin(theta);0,1,0;-sin(theta),0,cos(theta)]
f=matriz_y*e
x=f(1,:)
y=f(2,:)
z=f(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
end
for i=0:3
clf
matriz_0=[0,0,0,0,0,3,3,0,0,3,3,0,3,3,3,3;0,0,1,1,0,0,1,1,1,1,0,0,0,0,1,1;0,1,1,0,0,0,0,0,1,1,1,1,1,0,0,1]
matriz_1=[0,0,-1,-1,0,0,0,-1,-1,0,-1,-1,-1,-1,0,0;0,1,1,0,0,0,1,1,0,0,0,0,1,1,1,1;0,0,0,0,0,-3,-3,-3,-3,-3,-3,0,0,-3,-3,0]
x=matriz_0(1,:)
y=matriz_0(2,:)
z=matriz_0(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
for i=0:45
clf
theta = -(i * pi)/180
matriz_y=[cos(theta),0,sin(theta);0,1,0;-sin(theta),0,cos(theta)]
a=matriz_y*matriz_0
x=a(1,:)
y=a(2,:)
z=a(3,:)
plot3(x,y,z)
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
pause(0.030)
end
pause(0.5)
for i=0:90
clf
theta = (i * pi)/180
matriz_z=[cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1]
b=matriz_z*a
x=b(1,:)
y=b(2,:)
z=b(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
poste=matriz_z*matriz_1
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = -(i * pi)/180
matriz_x=[1,0,0;0,cos(theta),-sin(theta);0,sin(theta),cos(theta)]
c=matriz_x*b
x=c(1,:)
y=c(2,:)
z=c(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = (i * pi)/180
matriz_x=[1,0,0;0,cos(theta),-sin(theta);0,sin(theta),cos(theta)]
d=matriz_x*c
x=d(1,:)
y=d(2,:)
z=d(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=poste(1,:)
y=poste(2,:)
z=poste(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:90
clf
theta = -(i * pi)/180
matriz_z=[cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1]
e=matriz_z*d
x=e(1,:)
y=e(2,:)
z=e(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
poste1=matriz_z*poste
x=poste1(1,:)
y=poste1(2,:)
z=poste1(3,:)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
for i=0:45
clf
theta = (i * pi)/180
matriz_y=[cos(theta),0,sin(theta);0,1,0;-sin(theta),0,cos(theta)]
f=matriz_y*e
x=f(1,:)
y=f(2,:)
z=f(3,:)
plot3(x,y,z)
axis([-5,5,-5,5,-5,5])
hold on
x=matriz_1(1,:)
y=matriz_1(2,:)
z=matriz_1(3,:)
plot3(x,y,z)
plot3(x,y,z)
hold on
pause(0.030)
end
pause(0.5)
end
martes, 22 de diciembre de 2009
Las funciones en lenguaje C
http://www.publispain.com/supertutoriales/programacion/c_y_cplus/cursos/3/
domingo, 13 de diciembre de 2009
martes, 8 de diciembre de 2009
Código APS para insertar registros en la base de datos conectada al SQLDataSource1
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim inserta As String
inserta = "insert into experimento values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')"
SqlDataSource1.InsertCommand = inserta
SqlDataSource1.Insert()
Dim inserta As String
inserta = "insert into experimento values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')"
SqlDataSource1.InsertCommand = inserta
SqlDataSource1.Insert()
Suscribirse a:
Entradas (Atom)
