Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function vectorField2( f ,g, It, Ix, Iy )
  2. %UNTITLED Summary of this function goes here
  3. % Detailed explanation goes here
  4. t=It(1):0.25:It(2);
  5. x=Ix(1):0.25:Ix(2);
  6. y=Iy(1):0.25:Iy(2);
  7. [T,X,Y]=meshgrid(t,x,y);
  8. vx=cos(atan(g(T,X,Y)./f(T,X,Y)));
  9. vy=sin(atan(g(T,X,Y)./f(T,X,Y)));
  10. subplot(2,2,1)
  11. quiver(X,Y,vx,vy)
  12. %plano t-x
  13. vt1=cos(atan(f(T,X,Y)));
  14. vx1=sin(atan(f(T,X,Y)));
  15. subplot(2,2,3)
  16. quiver(T(:,:,30),X(:,:,30),vt1(:,:,30),vx1(:,:,30))
  17. %plano t-y
  18. y(30)
  19. vt2=cos(atan(g(T,X,Y)));
  20. vy2=sin(atan(g(T,X,Y)));
  21. subplot(2,2,4)
  22. quiver(T,Y,vt2,vy2)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement