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 Comments

We need to see the error traceback, including how you call stprtool()
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);

Sign in to comment.

 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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!