stprtool, '??? Reference to non-existent field 'X'."

i load a txt file in matlab that is a 4097*1 matrix.now i using stprtool for process of this data.when use function of stprtool,i have this error''??? Reference to non-existent field 'X'.''can i remove this error?

2 comentarios

Walter Roberson
Walter Roberson el 19 de Jul. de 2012
We need to see the error traceback, including how you call stprtool()
meysam
meysam el 21 de Jul. de 2012
Editada: meysam el 21 de Jul. de 2012
hi and thanks alot for your attention walter.
i use this statements:
>> trn=load('Z001')
trn =
Z001: [4097x1 double]
>> tst=load('Z002')
tst =
Z002: [4097x1 double]
>> model=fld(trn);

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Jul. de 2012
You are using a third party tool. Statistical Pattern Recognition Toolbox
According to the source at http://cmp.felk.cvut.cz/cmp/software/stprtool/manual/linear/fisher/fld.html the Fisher Linear Discriminant function has
Input:
data [struct] Binary labeled training vectors.
.X [dim x num_data] Training vectors.
.y [1 x num_data] Labels (1 or 2).
You are instead passing in a struct that has the single field "Z001" which is a column vector of double.
By matching array dimensions against "[dim x num_data]", if your structure field "Z001" were to be renamed to "x" then the implication would be that you wanted to analyze a single sample (num_data = 1) of dimension 4097; your .y vector would then need to be a scalar value indicating whether that one sample should be considered class 1 or class 2.
It does not appear to me that you are likely to be able to get a satisfactory FLD of your data.

Más respuestas (0)

Categorías

Community Treasure Hunt

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

Start Hunting!

Translated by