## [Plplot-cvs] SF.net SVN: plplot:[12767] trunk/examples/octave/x22c.m

 [Plplot-cvs] SF.net SVN: plplot:[12767] trunk/examples/octave/x22c.m From: - 2013-11-27 13:32:45 ```Revision: 12767 http://sourceforge.net/p/plplot/code/12767 Author: andrewross Date: 2013-11-27 13:32:41 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Update octave version of example 22. Modified Paths: -------------- trunk/examples/octave/x22c.m Modified: trunk/examples/octave/x22c.m =================================================================== --- trunk/examples/octave/x22c.m 2013-11-27 12:16:50 UTC (rev 12766) +++ trunk/examples/octave/x22c.m 2013-11-27 13:32:41 UTC (rev 12767) @@ -18,6 +18,8 @@ 1; +global xmax; + function ix22c ## Parse and process command line arguments */ @@ -43,14 +45,18 @@ ## Set arrow style using arrow_x and arrow_y then ## plot using these arrows. plsvect(arrow_x', arrow_y', fill); - constriction; + constriction(1); ## Set arrow style using arrow2_x and arrow2_y then ## plot using these filled arrows. */ fill = 1; plsvect(arrow2_x', arrow2_y', fill); - constriction; + constriction(2); + constriction2; + + plsvect([],[],0); + potential; ## Don't forget to call plend1 to finish off! */ @@ -86,7 +92,7 @@ end ## Vector plot of flow through a constricted pipe -function constriction +function constriction( astyle ) nx = 20; ny = 20; @@ -103,18 +109,75 @@ yg = ones(nx,1)*[ymin+dy/2:dy:ymax-dy/2]; b = ymax/4.0.*(3-cos(pi*xg/xmax)); - dbdx = ymax/4.0.*sin(pi*xg/xmax).*yg./b; + dbdx = ymax/4.0.*sin(pi*xg/xmax)*pi/xmax.*yg./b; u = Q*ymax./b.*(abs(yg)

 [Plplot-cvs] SF.net SVN: plplot:[12767] trunk/examples/octave/x22c.m From: - 2013-11-27 13:32:45 ```Revision: 12767 http://sourceforge.net/p/plplot/code/12767 Author: andrewross Date: 2013-11-27 13:32:41 +0000 (Wed, 27 Nov 2013) Log Message: ----------- Update octave version of example 22. Modified Paths: -------------- trunk/examples/octave/x22c.m Modified: trunk/examples/octave/x22c.m =================================================================== --- trunk/examples/octave/x22c.m 2013-11-27 12:16:50 UTC (rev 12766) +++ trunk/examples/octave/x22c.m 2013-11-27 13:32:41 UTC (rev 12767) @@ -18,6 +18,8 @@ 1; +global xmax; + function ix22c ## Parse and process command line arguments */ @@ -43,14 +45,18 @@ ## Set arrow style using arrow_x and arrow_y then ## plot using these arrows. plsvect(arrow_x', arrow_y', fill); - constriction; + constriction(1); ## Set arrow style using arrow2_x and arrow2_y then ## plot using these filled arrows. */ fill = 1; plsvect(arrow2_x', arrow2_y', fill); - constriction; + constriction(2); + constriction2; + + plsvect([],[],0); + potential; ## Don't forget to call plend1 to finish off! */ @@ -86,7 +92,7 @@ end ## Vector plot of flow through a constricted pipe -function constriction +function constriction( astyle ) nx = 20; ny = 20; @@ -103,18 +109,75 @@ yg = ones(nx,1)*[ymin+dy/2:dy:ymax-dy/2]; b = ymax/4.0.*(3-cos(pi*xg/xmax)); - dbdx = ymax/4.0.*sin(pi*xg/xmax).*yg./b; + dbdx = ymax/4.0.*sin(pi*xg/xmax)*pi/xmax.*yg./b; u = Q*ymax./b.*(abs(yg)