diff --git a/@MoDT/attachData.m b/@MoDT/attachData.m index 72a9ce1..32e4916 100644 --- a/@MoDT/attachData.m +++ b/@MoDT/attachData.m @@ -59,6 +59,9 @@ function attachData(self, Y_, t_, varargin) assert(ismember(datatype_,{'single','double'}), self.badValueErrId, ... 'Datatype must be single- or double-precision floating point'); +% Cast w to the same datatype as Y +w_ = cast(w_, datatype_); + % (2) Assign values ------------------------------------------------------------ % Clear caches