When plotting perceptron dataset using plotpv, the plot doesn't categorize the legends, but just repeats for all target data.
Ältere Kommentare anzeigen
I'm using 2X92 Input data and 1X92 target data and plotting the dataset using plotpv. The target data values are either 0 or 1. The plot generated with different marker for 0 and 1 of target data, but the legends are not set right. Both legends show the same marker for zero.
plotpv(P, T);
legend('A','B');
When I use the following, the system shows all 92 target data as legends. Not the marker type.
legend();
How to fix this to show the legends to show the marker types only?
Antworten (1)
Walter Roberson
am 25 Aug. 2023
0 Stimmen
plotpv(X,T) take an RxQ matrix of Q R-element input vectors X and
an SxQ matrix of S-element target vectors T, and plots the columns of
X with markers based on T.
You have 92 columns, so you get 92 lines plotted.
This differs from plot(). When you use plot() and one of X or Y is a vector but the other is a matrix, then the vector will be converted to a column vector, and then the matrix will, if necessary, be transposed so that it has the same number of rows as that column vector has -- after which it will produce one line for each column of the modified array. So in the case of 2 x 92 X and 1 x 92 Y, it would rotate the Y to be 92 x 1 then rotate the X to be 92 x 2, and then would create 2 lines.
... but that is not what plotpv does. plotpv does not do any automatic alignment of vectors and matrices.
Kategorien
Mehr zu Polar Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

