diff --git a/@ensembleMetadata/buildFromPrimitives.m b/@ensembleMetadata/buildFromPrimitives.m index eba4ae6e..b4aa2b26 100644 --- a/@ensembleMetadata/buildFromPrimitives.m +++ b/@ensembleMetadata/buildFromPrimitives.m @@ -59,7 +59,8 @@ k = 3; end - varName = meta.variableNames(whichArg(r,k)); + v = whichArg(r,k); + varName = meta.variableNames(v); dimName = meta.dims{v}(whichArg(r,k+1)); stateName = stateType(whichArg(r, k+2)); meta.metadata.(varName).(stateName).(dimName) = data; @@ -75,4 +76,4 @@ end -end \ No newline at end of file +end