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에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!