Time Series Objects give errors when migrated to Matlab R2010b

2 views (last 30 days)
Hi there,
I've stored lots of test data in structs containing user defined tscollection2 classes containing timeseries2 objects. My user defined timeseries2 and tscollection2 are subclasses from the matlab built in objects (timeseries2 < timeseries). They just add some extra methods and properties, nothing complicated. This was done in Matlab R2008b
I've moved to a 64bits system with Matlab R2010a to avoid memory problems. However, when loading the test data. Matlab seems unable to handle my user defined classes. Although I am able to create new timeseries2 objects. Matlab errors when handling the old timeseries2 objects.
I assume this is caused due to changes in the timeseries2 object from R2008->R2010. Any solution for this?
Thanks in advance.
Timo
>> timeseries2(rand(10,1))
timeseries2
Common Properties:
Name: 'unnamed'
Time: [10x1 double]
TimeInfo: [1x1 tsdata.timemetadata]
Data: [10x1 double]
DataInfo: [1x1 tsdata.datametadata]
More properties, Methods
Data source unknown
Unit unknown
>>
>> load 20110525test
>> class(tsc)
ans =
tscollection
>> tsc
Time Series Collection Object: unnamed
Empty
This is strange as the tsc shows to contain a lot of data in the workspace. However, the names of the timeseries within tsc are recognized. Look at the next attempt:
>> tsc.adcp_battery
??? Error using ==> timeseries.set at 130
Length of time and data do not match
Error in ==> tscollection.tscollection>tscollection.getts
at 118
ts =
set(ts,extraFields{j},this.Members_(k).ExtraProps.(extraFields{j}));
Error in ==> tscollection.subsref at 101
ts = getts(h,h.Members_(ind(1)).Name);
The same error occurs when I ask:
>> class(tsc.adcp_battery)
??? Error using ==> timeseries.set at 130
Length of time and data do not match
Error in ==> tscollection.tscollection>tscollection.getts
at 118
ts =
set(ts,extraFields{j},this.Members_(k).ExtraProps.(extraFields{j}));
Error in ==> tscollection.subsref at 101
ts = getts(h,h.Members_(ind(1)).Name);
Apparently, the timevector is not found within the object. But I know for sure it's there in Matlab 2008b
>> tsc.Time
ans =
[]

Answers (2)

Titus Edelhofer
Titus Edelhofer on 9 Sep 2011
Hi Timo,
is it 2010a or 2010b? In 2010b a change to timeseries objects was introduced to allow for arrays of timeseries objects, see
web([docroot '/techdoc/rn/bslob7_-1.html'])
Otherwise, perhaps you could post the error message together with some lines of code that shows, where the error happens?
Titus
  1 Comment
Timo
Timo on 9 Sep 2011
Hi Titus,
I am using 2010a, not b. I added some lines to add some hints. Apparently the timevector data cannot be found...

Sign in to comment.


Timo
Timo on 14 Sep 2011
Any suggestions to solve this problem?

Community Treasure Hunt

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

Start Hunting!