From 55bc02d59154322a63dabb11d954c3c15a7e7061 Mon Sep 17 00:00:00 2001 From: idlebear <11653808+idlebear@users.noreply.github.com> Date: Sat, 31 Mar 2018 10:00:26 -0400 Subject: [PATCH] Typo in variable name At some point the name for the obstacle list changed from o to obsts... --- .../02-examples_practice/gallerypfield/potentialField.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab_simulation/02-examples_practice/gallerypfield/potentialField.m b/matlab_simulation/02-examples_practice/gallerypfield/potentialField.m index befaa49..65563b5 100644 --- a/matlab_simulation/02-examples_practice/gallerypfield/potentialField.m +++ b/matlab_simulation/02-examples_practice/gallerypfield/potentialField.m @@ -8,7 +8,7 @@ numObsts = length(obsts); for i=1:numObsts - co=o{i}; + co=obsts{i}; [co(:,1), co(:,2)] = poly2ccw(co(:,1), co(:,2)); % Convert to ccw poly K = convhull(co(:,1), co(:,2)); % Take convex hull co = co(K(1:end-1),:); @@ -64,7 +64,7 @@ gVcur = Katt*(pos-endPos); for m=1:numObsts - curobs = o{m}; + curobs = obsts{m}; if (inpolygon(pos(1),pos(2),curobs(:,1),curobs(:,2))) gVcur = [NaN NaN]; else @@ -109,7 +109,7 @@ %Repulsive potentials for m=1:numObsts - curobs = o{m}; + curobs = obsts{m}; if (inpolygon(pos(1),pos(2),curobs(:,1),curobs(:,2))) V(i,j) = Vmax; gV(:,i,j) = [NaN NaN];