Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Problema 1
% Vector E
Ex = 0;
Ey = 3;
Ez = 4;
E = [Ex Ey Ez];
% Vector F
Fx = 4;
Fy = -10;
Fz = 5;
F = [Fx Fy Fz];
% Vector E
grid on;
quiver3(0,0,0,Ex,Ey,Ez,'r');
hold on;
% Vector F
quiver3(0,0,0,Fx,Fy,Fz,'b');
% Vector A
A = [Ax Ay Az];
% Etiquetado de vectores
txtE = 'E';
text(Ex-0.2,Ey-0.2,Ez-0.7,txtE,"FontSize",13);
txtF = 'F';
text(Fx-0.8,Fy-0.8,Fz-0.3,txtF,"FontSize",13);
txtaA = 'aA';
text(aAx+0.15,aAy+0.2,aAz+0.2,txtaA,"FontSize",13);
hold off
Problema 2
Bx = -4;
By = 0;
Bz = 5;
B = [Bx By Bz];
% Distancia entre A y B
rA = A;
rB = B;
rAB = rB - rA;
dAB = norm(rAB);
disp('La distancia entre A y B es:');
disp(dAB);
% Ecuacion vectorial
P = A;
v = rAB;
disp('La ecuacion de la recta es:')
r = ['(x,y,z) = ','(' , num2str(A),')',' + t','(', num2str(rAB),')'];
disp(r);
% Punto C
C = [7 -1 2];
% Vector AC
AC = C - A;
% Distancia mas corta de AB y el C
dABC = norm(cross(v,AC))/norm(v);
disp('La distancia mas corta es:');
disp(dABC);
Problema 3
Gr = 4;
Gfi = pi/3;
Gz = 5;
Pg = [Gr Gfi Gz];
Gx = 3*cos(Gfi)^2+2*Gr*sin(Gfi);
Gy = 3*sin(Gfi)*cos(Gfi)-2*Gr*cos(Gfi);
Gz = Gz;
% Campo vectorial en coordenadas cartesianas:
Gc = [Gx Gy Gz];
disp('El campo vectorial en coordenadas cartesianas es:');
disp(Gc);
Pgx = Gr*cos(Gfi);
Pgy = Gr*sin(Gfi);
Pgz = Gz;
Pgc = [Pgx Pgy Pgz];
disp('El punto P en coordenadas cartesianas');
disp(Pgc);
% El campo en coordenadas cartesianas en el punto P
quiver3(0,0,0,Gx,Gy,Gz,'m');
grid on;
hold on;