The best way for us to help is to have
1.The name of one of the MATLAB nndata sets (help nndatasets) on which we can test your code. For example, the crab_data set using only the first row of the target matrix.
2. Post code that either runs when cut and pasted or is close to running.Include any error messages.
3. Have you looked at the results of
net = newpnn(tr_feature',ind2vec(tr_true')) % NO SEMICOLON
4. The notation 'tr' should be reserved for the training record output of training, i.e., [ net tr ] = train(net,input,target);
5. nbclasses = 2?
Hope this helps.
Greg