Mercurial > hg > octave-lyh
changeset 14222:190952239c2c
Use '!' for not operation in preference to '~'.
* profexplore.m, inpolygon.m, __gnuplot_drawnow__.m, spline.m: Use '!' for not
operation in preference to '~'.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 18 Jan 2012 21:17:14 -0800 |
parents | b03b15d507d4 |
children | ba7a26030214 |
files | scripts/general/profexplore.m scripts/geometry/inpolygon.m scripts/plot/__gnuplot_drawnow__.m scripts/polynomial/spline.m |
diffstat | 4 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/profexplore.m +++ b/scripts/general/profexplore.m @@ -32,7 +32,7 @@ function profexplore (data) - if (nargin ~= 1) + if (nargin != 1) print_usage (); endif @@ -87,7 +87,7 @@ printf ("help Display this help message.\n"); printf ("up [N] Go up N levels, where N is an integer. Default is 1.\n"); printf ("N Go down a level into option N.\n"); - elseif (~isnan (option)) + elseif (! isnan (option)) if (option < 1 || option > length (tree)) printf ("The chosen option is out of range!\n"); else @@ -115,7 +115,7 @@ if (length (cmd) > 3 && cmd(3) == ' ') opt = fix (str2double (substr (cmd, 3))); - if (~isnan (opt) && opt > 0) + if (! isnan (opt) && opt > 0) rv = opt; return; endif
--- a/scripts/geometry/inpolygon.m +++ b/scripts/geometry/inpolygon.m @@ -100,7 +100,7 @@ %! plot(xv,yv) %! hold on %! plot(x(inside),y(inside),"@g") -%! plot(x(~in),y(~in),"@m") +%! plot(x(!in),y(!in),"@m") %! plot(x(on),y(on),"@b") %! hold off %! disp("Green points are inside polygon, magenta are outside,"); @@ -120,11 +120,11 @@ %! [x,y]=meshgrid(xa,ya); %! [in,on]=inpolygon(x,y,xv,yv); %! -%! inside=in & ~ on; +%! inside=in & !on; %! plot(xv,yv) %! hold on %! plot(x(inside),y(inside),"@g") -%! plot(x(~in),y(~in),"@m") +%! plot(x(!in),y(!in),"@m") %! plot(x(on),y(on),"@b") %! hold off %! disp("Green points are inside polygon, magenta are outside,");
--- a/scripts/plot/__gnuplot_drawnow__.m +++ b/scripts/plot/__gnuplot_drawnow__.m @@ -147,7 +147,7 @@ if (! isempty (h) && isfigure (h)) ## Generate gnuplot title string for plot windows. - if (output_to_screen (term) && ~strcmp (term, "dumb")) + if (output_to_screen (term) && ! strcmp (term, "dumb")) fig.numbertitle = get (h, "numbertitle"); fig.name = strrep (get (h, "name"), "\"", "\\\""); if (strcmpi (get (h, "numbertitle"), "on")) @@ -210,7 +210,7 @@ size_str = sprintf ("size %gin,%gin", gnuplot_size); case "dumb" new_stream = 1; - if (~isempty (getenv ("COLUMNS")) && ~isempty (getenv ("LINES"))) + if (! isempty (getenv ("COLUMNS")) && ! isempty (getenv ("LINES"))) ## Let dumb use full text screen size (minus prompt lines). n = sprintf ("%i", -2 - length (find (sprintf ("%s", PS1) == "\n"))); ## n = the number of times \n appears in PS1