changeset 793:95d876f319c4

strel: mark object as flat if height values are all zeros.
author Carnë Draug <carandraug@octave.org>
date Mon, 30 Sep 2013 21:47:02 +0100
parents f88a5d39656d
children 7c52da57ef04
files inst/@strel/strel.m
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/inst/@strel/strel.m
+++ b/inst/@strel/strel.m
@@ -190,6 +190,10 @@
         error ("strel: HEIGHT must be a finite real matrix of the same size as NHOOD");
       endif
 
+      if (nnz (SE.height) == 0)
+        SE.flat = true;
+      endif
+
     case "ball"
       if (numel (varargin) == 2)
         radius = varargin{1};