MATLAB: How to update data for quiver plot linkdata onquiver Hello, I'm trying update a quiver plot with "linkdata on" – is that possible? When it is not, what else can I do? My goal is to show a time varying vectorfield. Thank you for any suggestions. Philipp Best Answer I think that this is impossible for quiver plot.Try this code:[X,Y] = meshgrid(-2:.2:2);Z = X.*exp(-X.^2 - Y.^2);[DX,DY] = gradient(Z,.2,.2);h = quiver(X,Y,DX,DY);xlim([-2.5 2.5])for t=1:-0.1:-1Z = X.*exp((-X.^2 - Y.^2)*t);[DX,DY] = gradient(Z,.2,.2);set(h,'udata',DX,'vdata',DY)pause(0.1)end Related SolutionsMATLAB: How do i plot x^2 +4y^2 +9z^2 = 1 fimplicit3(@(x,y,z) x.^2 +4*y.^2 +9*z.^2 - 1) MATLAB: How to plot the gradient vector of y=f(X) which is perpendicular to the graph Axis equal cannot solve the problem. I solved it on my own. Here is the codes: x=-pi:0.2:pi;figurey1=sin(x);plot(x,y1,'linewidth',2)xlim([-pi pi])xlabel({'$x$'},'interpreter','latex')ylabel({'$y$'},'interpreter','latex')v1=-cos(x);v2=ones(1,length(x));hold onquiver(x,y1,v1,v2,0.2) Related QuestionHow to solve system of equation in MatlabFinding normals to contours on contour plotHow to find the maximum gradient around a data point
Best Answer