Quiver plots new vectors for each iteration of for loop

3 visualizaciones (últimos 30 días)
Karthik Brs
Karthik Brs el 27 de Nov. de 2015
Hello Everybody, I have a problem here. The quiver command which I have used for the code as seen below plots new vectors for the each iteration of the 'for' loop. framesPerSec = 35;
hFig = figure; % to define Figure Properties
set(hFig, 'Position', [0 0 1000 1000]);
geoplot('gehause_Bmuster2');
view([90 0]);
hold all;
for e = 1:5:length(range);
% q = quiver(y,x, mag_Z(100,:)'.*cos(Ph_Z(100,:)'+range(e)), mag_Y(100,:)'.*cos(Ph_Y(100,:)'+range(e)),'MarkerSize',3,'AutoScaleFactor',0.9,'Clipping','on','LineWidth',1.5,'MaxHeadSize',0.1);
q = quiver3(y,x,z, mag_Z(21,:)'.*cos(Ph_Z(21,:)'+range(e)), mag_Y(21,:)'.*cos(Ph_Y(21,:)'+range(e)), mag_X(21,:)'.*cos(Ph_X(21,:)'+range(e)),'MarkerSize',3,'AutoScaleFactor',0.9,'LineWidth',1.5,'MaxHeadSize',0.1);
pause(30/framesPerSec);
% F_total(e)= sqrt((mag_X(1).*cos(Ph_X(1)+range(e)))^2+(mag_Y(1).*cos(Ph_Y(1)+range(e)))^2);
axis([-200 150 -200 150]);
M(e) = getframe;
Fz(e) = mag_Z(100,1)'.*cos(Ph_Z(100,1)'+range(e));
end
movie(M,10,framesPerSec);
The quiver does this only with the 'geoplot' which is basically a plots a geometry for predefined coordinates. If I remove the hold and this 'geoplot', the quiver works fine. I just want quiver to plot the vector field of 1 vector each in the 5 coordinates. I am including my workspace variables with this query. Please help!

Respuestas (0)

Categorías

Más información sobre Vector Fields en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by