Professional Documents
Culture Documents
Graficas 3D (Parte 4) - Campos Vectoriales
Graficas 3D (Parte 4) - Campos Vectoriales
Z = randn(20,20);
compass(Z)
Z = eig(randn(20,20));
compass(Z)
FEATHER:
% Coordenadas cartesianas:
x = 2;
y = 3;
feather(x,y); % Plot velocity vectors
% Coordenadas polares:
theta = 45*pi/180;
r = 2.5;
[u,v] = pol2cart(theta,r);
%Transform polar or cylindrical coordinates to Cartesian
figure
feather(u,v);
theta = (-90:10:90)*pi/180;
r = 2*ones(size(theta));
[u,v] = pol2cart(theta,r);
figure
feather(u,v);
Super:
https://www.youtube.com/watch?v=EYyI42Wp9OI
Use quiver to display an arrow at each data point in x and y such that the arrow direction and length
represent the corresponding values in u and v.
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
quiver(x,y,u,v)
EJEMPLO 2:
figure
contour(X,Y,Z)
hold on
quiver(X,Y,DX,DY)
hold off
EJEMPLO 3:
[X,Y] = meshgrid(-2:0.25:2,-1:0.2:1);
Z = X.* exp(-X.^2 - Y.^2);
[U,V,W] = surfnorm(X,Y,Z);
figure
quiver3(X,Y,Z,U,V,W,0.5)
hold on
surf(X,Y,Z)
view(-35,45)
axis([-2 2 -1 1 -.6 .6])
hold off
SUPER -----Serie de 3 videos:
https://www.youtube.com/watch?v=qOcFJKQPZfo
https://www.youtube.com/watch?v=Cxc7ihZWq5o
https://www.youtube.com/watch?v=vvzTEbp9lrc
https://www.youtube.com/watch?v=XmEeerT6o1g
Electric Fields & Potential
SCALAR FIELDS:
https://www.youtube.com/watch?v=lm0v2Ovi2iM