Problems adding time series object to a time series collection
1 次查看(过去 30 天)
显示 更早的评论
I have a time series collection with several objects. Inserting a new object using addts does not work. To try to isolate the error I have tried to extract a time series object from the collection
ts=tsc.(tsname); % works fine
Then I rename the time series object to a new name not being used by any other objects in the collection
ts.name='newts'; % works fine
The I try to add this object to the collection. The object is an exact copy of an object already member of the collection, but with a new unused name.
tsc=addts(tsc,ts); % this fails returning the following error messages
Error using vertcat Number of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that these arrays have the same set of fields.
Error in tscollection/setts (line 155) this.Members_ = [this.Members_; x];
Error in tscollection/addts>localUpdateTS (line 187) h = setts(h,ts,ts.Name);
Error in tscollection/addts (line 123) h = localUpdateTS(h,ts,name);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time Series Collections 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!