kNN_Übung_1 - Aufgabe 3 mit Matlab

Antworten
tapirrot
Beiträge: 13
Registriert: 04.10.2010 08:39

kNN_Übung_1 - Aufgabe 3 mit Matlab

Beitrag von tapirrot »

Man könnte die Ausgabe etwas verbessern:

Code: Alles auswählen

for(a=0:8)
    sprintf('Input Nr %d: %s', a,dec2bin(a,5))
    sprintf('Output a: %s', mat2str([ones(1,a),zeros(1,10-a)]))
    sprintf('Output b: %s', mat2str([zeros(1,a),ones(1,1),zeros(1,9-a)]))
end

Antworten