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

Asked by meysam on 19 Jul 2012
Latest activity Answered by Walter Roberson on 21 Jul 2012

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 Comments

Walter Roberson on 19 Jul 2012

We need to see the error traceback, including how you call stprtool()

meysam on 21 Jul 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);

meysam

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 21 Jul 2012
Accepted answer

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.

0 Comments

Walter Roberson

Contact us