diff --git a/examples/matlab/PlanarSLAMExample_easy.m b/examples/matlab/PlanarSLAMExample_easy.m index 85a517ede..a46217deb 100644 --- a/examples/matlab/PlanarSLAMExample_easy.m +++ b/examples/matlab/PlanarSLAMExample_easy.m @@ -80,6 +80,6 @@ gfg = graph.linearize(result,ord); denseAb = gfg.denseJacobian %% Get sparse matrix -IJS = gfg.sparse([12 7 4 10 1 14]'); +IJS = gfg.sparse(); Ab=sparse(IJS(1,:),IJS(2,:),IJS(3,:)); -spy(Ab); +spy(Ab(:,1:end-1)); diff --git a/gtsam.h b/gtsam.h index fd6bd962e..c45fbf48c 100644 --- a/gtsam.h +++ b/gtsam.h @@ -110,7 +110,7 @@ class GaussianFactorGraph { void combine(const GaussianFactorGraph& lfg); Matrix denseJacobian() const; Matrix denseHessian() const; - Matrix sparse(Vector columnIndices) const; + Matrix sparse() const; }; class Landmark2 {