From 59be8e4be4f358315960996735ca6c1127d3721d Mon Sep 17 00:00:00 2001 From: Paul BIGNIER Date: Fri, 27 Sep 2013 11:57:47 +0200 Subject: [PATCH] Graphics demos: remove warnings in Bezier demos Change-Id: Ia1a109eb568b5ddcc9269edc9d3bb2cb5647ab48 --- scilab/modules/graphics/demos/bezier/Macros.sci | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scilab/modules/graphics/demos/bezier/Macros.sci b/scilab/modules/graphics/demos/bezier/Macros.sci index 940758d..28ebf02 100644 --- a/scilab/modules/graphics/demos/bezier/Macros.sci +++ b/scilab/modules/graphics/demos/bezier/Macros.sci @@ -49,7 +49,7 @@ function [z] = bezier(p,t) n=size(p,"c")-1;// i=nonzeros(t~=1); t1=(1-t); t1z= find(t1==0.0); t1(t1z)= ones(t1z); T=dup(t./t1,n)'; - b=[((1-t')^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; + b=[((1-t').^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; b=cumprod(b,"c"); if (size(t1z,"c")>0); b(t1z,:)= dup([ 0*ones(1,n),1],size(t1z,"c")); end; z=p*b'; @@ -79,7 +79,7 @@ function [X,Y,Z]=beziersurface (x,y,z,n) n=size(x,"r")-1; // i=nonzeros(t~=1); t1=(1-t); t1z= find(t1==0.0); t1(t1z)= ones(t1z); T=dup(t./t1,n)'; - b1=[((1-t')^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; + b1=[((1-t').^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; b1=cumprod(b1,"c"); if (size(t1z,"c")>0); b1(t1z,:)= dup([ 0*ones(1,n),1],size(t1z,"c")); @@ -87,7 +87,7 @@ function [X,Y,Z]=beziersurface (x,y,z,n) n=size(x,"c")-1; // i=nonzeros(t~=1); t1=(1-t); t1z= find(t1==0.0); t1(t1z)= ones(t1z); T=dup(t./t1,n)'; - b2=[((1-t')^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; + b2=[((1-t').^n),(T.*dup((n-(1:n)+1)./(1:n),size(t,"c")))]; b2=cumprod(b2,"c"); if (size(t1z,"c")>0); b2(t1z,:)= dup([ 0*ones(1,n),1],size(t1z,"c")); -- 1.7.9.5