While using the following table format to extract features in diagonosti​cfeaturede​signer toolbox error"index in position 2 exceeds array bounds" error is generated

The error "index in position 2 exceeds array bounds" is generated.
The diagonostic featuredesigner also does not extract all the signals in the column.

7 Comments

whos -file matlab
Name Size Bytes Class Attributes T - 6727669 table
load matlab
head(T)
tt ___________________ {70001×1 timetable} {70001×1 timetable} {70001×1 timetable} {70001×1 timetable} {70001×1 timetable} {70001×1 timetable}
You've managed to load a series of timetables inside a table; you can't reference those except indirectly by first referencing one of the timetables and then addressing whatever is in it...excepting that since the timetables are also in a cell, then you have to dereference them with the curlies "{}" instead of just using parentheses--
tt=T.tt{1}; % the first timetable
head(tt)
Time VarName2 _________ ___________ 0 sec -6.5166e-06 1e-06 sec -6.5166e-06 2e-06 sec -4.3815e-06 3e-06 sec -6.5166e-06 4e-06 sec -4.3815e-06 5e-06 sec -6.5166e-06 6e-06 sec -4.3815e-06 7e-06 sec -6.5166e-06
This is undoubtedly not what you intended; you need to unnest the data; we can't see what you did to manage to get it so wrapped up, but going back to creating/reading the data is where need to start...
Hi,
Yes. This is timeseries data wrapped up in a table .
However. I did this in order while following the example file attached here which is also a time series data wrapped up into a table.
when I view the data for this file it appears in this format.
Wowsers! What a mess of a way to store data to build an app around!!!!
Anyways, your file does NOT follow the same file format exactly, it (the example) has two variables of timetables plus the fault condition variable for each; you have only one timetable variable and no fault.
Undoubtedly it's trying to read an expected column; I didn't try to decipher the app but for training one presumes it is probably missing the fault variable as the second required column.
<See link> to discussion of building dataset ensembles for the app; it should give enough guidance that you can figure out the minimum data requirements (although I don't see in a very quick glance that it actually gives a specific requirement).
:) can add the fc column...however will it make a difference?
Hi,
Thanks for your reply.
Please find the data categorised.Here, I want only one particular feature data to be used for feature selection in contrary to the example?
Well, there are only two other perturbations to try--
  1. two timetable columns w/ no fault variable, and
  2. two timetable columns w/ a fault variable.
Then you will know the limits of what the app thinks it must have...I didn't even know it existed ere now so I don't have a klew; all I can tell you is to try it out and see and read all the doc carefully. It's possible the designers didn't think a one-variable model was something anybody would try to use it for....I really don't know what it does, perhaps the one-variable model would reduce to some form of MLE estimation that could be done w/ linear estimation tools???

Sign in to comment.

Answers (1)

Hi Rachita,
The issue is not your data format (table of timetables), which should work with the Diagnostic Feature Designer app. The issue is that the app expects the timetables in the same dataset to have the same Variable Names. In your dataset, each timetable has a different Variable Name -- VarName2, VarName3, VarName4, etc.
Try renaming all of the variables to the same name using the code below.
for i = 1:size(T,1)
T.tt{i,1}.Properties.VariableNames(1) = "VarName";
end

Products

Release

R2022a

Asked:

on 9 Sep 2023

Answered:

on 27 Nov 2023

Community Treasure Hunt

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

Start Hunting!