chap2 - Chapter 2 (partial) Solutions Exercise 2.1 (a) X (...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 2 (partial) Solutions Exercise 2.1 (a) X ( x, y ) = (0 , 1), a constant vector field.-10-5 5 10-10-5 5 10 y x vector field: (x,y,0,1) The m-file below was used to generate the figure: % vector field: (x,y) ---> ((x,y),(0,1)) clear clf % pick grid large so arrows don’t overlap x=-10:2:10; [X Y]=meshgrid(x); % vector field U=zeros(size(X)); V=ones(size(X)); % plot field quiver(X,Y,U,V) % plot labels xlabel(’x’), ylabel(’y’) title(’vector field: (x,y,0,1)’) % print plot print -deps field1a.eps (b) X ( x, y ) = − ( x, y ):-2-1.5-1-0.5 0.5 1 1.5 2-2-1.5-1-0.5 0.5 1 1.5 2 y x vector field: (x,y,-x,-y) The m-file: % vector field: (x,y) ---> ((x,y),-(x,y)) clear clf % choosing square grid x=-2:0.25:2; [X Y]=meshgrid(x); % vector field U=-X;V=-Y; % plot field quiver(X,Y,U,V) % plot labels xlabel(’x’), ylabel(’y’) % text(-0.9,0.25,’c=-1’) title(’vector field: (x,y,-x,-y)’) % print plot print -deps field1b.eps 2 (d) X ( x, y ) = ( y, x ):-2-1.5-1-0.5 0.5 1 1.5 2-2-1.5-1-0.5 0.5 1 1.5 2 y x vector field: (x,y,y,x) m-file: % vector field: (x,y)-->((x,y),(y,x)) clear clf % choosing square grid x=-2:0.25:2; [X Y]=meshgrid(x); % vector field U=Y;V=X; % plot field quiver(X,Y,U,V) % plot labels xlabel(’x’), ylabel(’y’) % text(-0.9,0.25,’c=-1’) title(’vector field: (x,y,y,x)’) % print plot print -deps field1d.eps 3 Exercise 2.2Exercise 2....
View Full Document

This document was uploaded on 09/22/2011.

Page1 / 7

chap2 - Chapter 2 (partial) Solutions Exercise 2.1 (a) X (...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online