changeset 12342:c9ac8c5da043 octave-forge

Suppress broadcasting operation warning in demos.
author asnelt
date Sat, 25 Jan 2014 18:36:18 +0000
parents f9f064cebe35
children 2391d8c8b12f
files main/statistics/inst/dendogram.m main/statistics/inst/regress_gp.m
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/main/statistics/inst/dendogram.m	Fri Jan 24 21:54:50 2014 +0000
+++ b/main/statistics/inst/dendogram.m	Sat Jan 25 18:36:18 2014 +0000
@@ -103,7 +103,7 @@
 
 %!demo
 %! v = 2*rand(30,1)-1;
-%! d = abs(v(:,1)-v(:,1)');
+%! d = abs(bsxfun(@minus, v(:,1), v(:,1)'));
 %! y = linkage (squareform(d,"tovector"));
 %! figure(gcf); clf;
 %! dendogram(y);
--- a/main/statistics/inst/regress_gp.m	Fri Jan 24 21:54:50 2014 +0000
+++ b/main/statistics/inst/regress_gp.m	Sat Jan 25 18:36:18 2014 +0000
@@ -83,7 +83,7 @@
 %!
 %! [m K yi dy] = regress_gp (x,y,[],xi);
 %!
-%! plot (x,y,'xk',xi,yi,'r-',xi,yi+[-dy +dy],'b-');
+%! plot (x,y,'xk',xi,yi,'r-',xi,bsxfun(@plus, yi, [-dy +dy]),'b-');
 
 %!demo
 %! % 2D Data
@@ -132,5 +132,5 @@
 %! axis tight
 %! axis manual
 %! hold on
-%! plot (xi,yi+[-dy +dy],'b-');
+%! plot (xi,bsxfun(@plus, yi, [-dy +dy]),'b-');
 %! hold off