From: Cedric Delamarre Date: Wed, 18 Sep 2013 15:59:36 +0000 (+0200) Subject: contour2d corrected. X-Git-Tag: 5.5.0-beta-1~141 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=ab8b90bd35023438441e53e4eb62205b64bde367 contour2d corrected. * exists() return a boolean. * boolean == constant is always false. Change-Id: Ieda04d53b094f5398cad7def6d600b09ca1d1cdb --- diff --git a/scilab/modules/graphics/macros/contour2d.sci b/scilab/modules/graphics/macros/contour2d.sci index f015e5f..87d9992 100644 --- a/scilab/modules/graphics/macros/contour2d.sci +++ b/scilab/modules/graphics/macros/contour2d.sci @@ -48,7 +48,7 @@ function levels = contour2d(x, y, z, nz, style, strf, leg, rect, nax, void) opts = []; levels = []; - if ~exists("style", "local") == 1 then + if ~exists("style", "local") then if size(nz, "*") == 1 then style = 1:nz; else @@ -56,7 +56,7 @@ function levels = contour2d(x, y, z, nz, style, strf, leg, rect, nax, void) end end - if exists("strf", "local") == 1 then + if exists("strf", "local") then yflag = part(strf, 2); if or(yflag == ["2" "4" "6" "8"]) then rect = [min(x), min(y), max(x), max(y)]; @@ -66,26 +66,26 @@ function levels = contour2d(x, y, z, nz, style, strf, leg, rect, nax, void) opts = [opts,"strf=strf"]; end - if exists("leg", "local") == 1 then + if exists("leg", "local") then opts = [opts, "leg=leg"]; end rectSpecified = %f; - if exists("rect","local") == 1 then + if exists("rect","local") then opts = [opts, "rect=rect"]; rectSpecified = %t; end - if exists("nax","local") == 1 then + if exists("nax","local") then opts = [opts, "nax=nax"]; end - if exists("logflag","local") == 1 then + if exists("logflag","local") then opts = [opts, "logflag=logflag"]; end - if exists("frameflag","local") == 1 then + if exists("frameflag","local") then opts = [opts,"frameflag=frameflag"]; else frameflag = []; end - if exists("axesflag","local") == 1 then + if exists("axesflag","local") then opts = [opts, "axesflag=axesflag"]; end opts = strcat([opts, "style=style(c)"], ",");