From 5d3f57ac53a0281d09ce458389b6896c84130f91 Mon Sep 17 00:00:00 2001 From: Robert F Cooper Date: Wed, 7 Dec 2022 08:55:21 -0600 Subject: [PATCH] Fixed missing indices on the pixelwindowsize to ensure it changes with position. Fixes #1. --- Coordinate_Mosaic_Metrics_MAP.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Coordinate_Mosaic_Metrics_MAP.m b/Coordinate_Mosaic_Metrics_MAP.m index 193fd7f7..76e32908 100644 --- a/Coordinate_Mosaic_Metrics_MAP.m +++ b/Coordinate_Mosaic_Metrics_MAP.m @@ -325,8 +325,8 @@ thisval = statistics{c}.(metriclist{selectedmetric}); - rowrange = round(coords(c,2)-(pixelwindowsize/2):coords(c,2)+(pixelwindowsize/2)); - colrange = round(coords(c,1)-(pixelwindowsize/2):coords(c,1)+(pixelwindowsize/2)); + rowrange = round(coords(c,2)-(pixelwindowsize(c)/2):coords(c,2)+(pixelwindowsize(c)/2)); + colrange = round(coords(c,1)-(pixelwindowsize(c)/2):coords(c,1)+(pixelwindowsize(c)/2)); rowrange(rowrange<1) =[]; colrange(colrange<1) =[];