MATLAB: How to calculate the output error for feedforwardnet

bipolar outputfeed forwardneural network

i have design my feedforwardnet according to the examples. but how do i calculate the misclassified output? this is where my program stop so far,
output=sim(net,inp);
i'm using -1 and 1 for my target
hope for some help since neural network is still something new to me. thank you

Best Answer

For classification of c classes, the target columns should be columns of the c-dimensional unit matrix.
class = vec2ind(target);
N = length(class);
....
assignedclass = vec2ind(output);
Nerr = sum(assignedclass ~= class);
PCTerr = 100*Nerr/N
Hope this helps.
Thank you for formally accepting my answer.
Greg