diff --git a/source/functions/BEMIO/readCAPYTAINE.m b/source/functions/BEMIO/readCAPYTAINE.m index 27f7bfe3a..69cc49688 100644 --- a/source/functions/BEMIO/readCAPYTAINE.m +++ b/source/functions/BEMIO/readCAPYTAINE.m @@ -476,7 +476,7 @@ end % set the indices that sort the old dofs/variables into the correct order -inds = zeros(1,max([6,sum(nDofs_per_body)])); +inds = zeros(1,length(sorted_dofs)); for j=1:length(old_dofs) for i=1:length(sorted_dofs) if lower(old_dofs(j)) == sorted_dofs(i)