필터 지우기
필터 지우기

What is cause of my timeseries data assignment error please

조회 수: 1 (최근 30일)
Ross
Ross 2013년 1월 11일
NaN should correspond with data type single but isn't accepted - see below. -------------------------------------------------
>> get(t.Force_01) % produces answer below
ans =
Events: []
Name: 'Force_01'
UserData: []
Data: [90750x3 single]
DataInfo: [1x1 tsdata.datametadata]
Time: [90750x1 double]
TimeInfo: [1x1 tsdata.timemetadata]
Quality: []
QualityInfo: [1x1 tsdata.qualmetadata]
IsTimeFirst: 1
TreatNaNasMissing: 1
Length: 90750
------------------------------------------------------
>> t.Force_01.Data(81812,3)=NaN %produces error below
Subscripted assignment between dissimilar structures.
Error in tscollection/setts (line 157)
this.Members_(I(1)) = x;
Error in tscollection/subsasgn (line 9)
varargout{1} = setts(h,thists,S(1).subs);
------------------------------------------------------
NOTE
>> t.Force_01.Data(81812,3) % this shows the structure is nothing special
ans =
-1.4650
------------------------------------------------------
The assignment works with small example below even though structures are the same as timeseries 't' (I think).
------------------------------------------------------
A = timeseries([1:3; 4:6],'Name','A');
B = timeseries([7:9; 10:12],'Name','B');
tscAB = tscollection({A B}, 'name', 'tscAB');
clear A B;
tscAB.A.Data(1,1)=NaN;
-------------------------------------------------------

답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by