Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [X Y] = meshgrid(-7.5:7.5,-7.5:7.5);
- U = -1*X.^3+2*X.^2;%-36.*X;%-23.0/25.0*X.^3+8.0/5.0.*X.^2;%-X+y0/x0*X;
- dx = -2.*X+Y;
- dy = X.*(X.^2-2.*X+1)-Y+U;
- du = dx./sqrt(dx.^2+dy.^2);
- dv = dy./sqrt(dx.^2+dy.^2);
- quiver(X,Y,du,dv);
- axis tight
- grid on
- hold on
- h1 = plot(x.data,y.data);
- h2 = plot([0],[0],'x');
- h3 = plot([x0],[y0],'x');
- set([h1,h2,h3],'LineWidth',4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement