필터 지우기
필터 지우기

Error when trying to access timetable properties (Matrix index is out of range for deletion.)

조회 수: 2 (최근 30일)
I created a simple timetable with a time variable t_HR in datetime format and a HR variable in double format;
HR_TT = timetable(t_HR,HR);
head(HR_TT)
ans =
8×1 timetable
t_HR HR
____________________ ___
01-Dec-2019 00:00:03 96
01-Dec-2019 00:00:18 96
01-Dec-2019 00:00:33 96
01-Dec-2019 00:00:48 96
01-Dec-2019 00:00:53 99
01-Dec-2019 00:01:03 98
01-Dec-2019 00:01:13 102
01-Dec-2019 00:01:18 102
I am trying to resample the data (there is irregular sampling) using retime, but don't want NaN values when interpolating or resampling.
Therefore I want to change the timetable property VariableContinuity to 'continuous'.
I tried accessing the timetable properties but the following error appears:
HR_TT.Properties
ans =
Matrix index is out of range for deletion.
Error in matlab.internal.datatypes.DisplayHelper/printToScreen (line 167)
t(logical(obj.isloose*[1 1])) = [];
Error in matlab.tabular.TabularProperties/disp (line 51)
h.printToScreen(name,false);
Could anyone help with this?
Many thanks
  댓글 수: 2
Cris LaPierre
Cris LaPierre 2020년 8월 26일
Could you attach a mat file containing your variables?
I wasn't able to reproduce your error using made up data.
Pedro Viana
Pedro Viana 2020년 8월 26일
Here is a truncated version.
I tried making different timetables with different kinds of data, but the error is the same.
Thank you

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

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 8월 28일
Something is not working correctly on your computer. Try restarting MATLAB. If it still happens, try restarting your computer.
For sanity checking, if you have access, run the same command in MATLAB Online (if you have access).
If the problem continues on your computer, you many need to try reinstalling MATLAB.

추가 답변 (1개)

Divija Aleti
Divija Aleti 2020년 8월 28일
The same data set is used to access the properties and error seems non- reproducible.
The highlighted property, as shown in the screenshot, can be changed by
>> HR_test.Properties.VariableContinuity = {'continuous'}
  댓글 수: 1
Pedro Viana
Pedro Viana 2020년 8월 28일
편집: Pedro Viana 2020년 8월 28일
This does not happen with my machine, however. I am running Matlab R2019b for Mac.
And running the command you mention:
>> HR_test.Properties.VariableContinuity = {'continuous'}
Does not affect the way the interpolation is then made (there are still the same number of NaNs).
In fact, this problem extends to tables in general: see screenshot

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

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by