Understanding the code snippet
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I do not understand what this is doing exactl Can anyone help?
eye_matrix = eye(num_labels);
y_matrix = eye_matrix(y,:);
0 Kommentare
Antworten (1)
Star Strider
am 10 Apr. 2019
By inspection, it generates an identity matrix with dimensions (num_labels x num_labels), then assigns the ‘y’ row of it to the ‘y_matrix’ vector. That vector would be all zeros, except for column ‘y’.
Beyond that, I have no idea what the purpose is.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Condensed Matter & Materials Physics finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!