How do I use the timeseries values as a normal vector

I have a long timeseries like this:
timeseries
Common Properties:
Name: 'unnamed'
Time: [186721x1 double]
TimeInfo: tsdata.timemetadata
Data: [1x1x186721 double]
DataInfo: tsdata.datametadat
lets call the timeseries object vehicleSpeed.
When I want to filter the data using conv like this
mask = ones(1,3);
filteredSpeed = conv(vehicleSpeed.data,mask,'same')
I get the following error
Error using conv (line 27)
A and B must be vectors
I have tried different metohods of using this timeseries as a vector without success. Please help.

댓글 수: 1

Looks like you somehow (inadvertently?) created the time series containing a cell array instead of a vector. Not sure how managed it; a simple experiment here to try to duplicate the above was unsuccessful.
I'd suggest recreating the timeseries object avoiding that if at all possible; if for some reason that's mandatory you can wrap the arguments to conv in a cell2mat call and that should, I believe, work--albeit klunky.
Perhaps show how you created the timeseries object would lead to better idea of how to avoid the problem to begin with.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Time Series에 대해 자세히 알아보기

질문:

2013년 11월 8일

댓글:

dpb
2013년 11월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by