The colum is the 12 that i want to normalize, i can't find a way to do a code that normalize one or specific columns without changing the others
I want to normalize just one column, how do i do that ?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Akzeptierte Antwort
Steven Lord
am 20 Mai 2021
format shortg % Changing the display format to make the normalized matrix look nicer
M = magic(6)
M(:, 4) = normalize(M(:, 4)) % Normalized with 'zscore'
M([1 3], :) = normalize(M([1 3], :), 2, 'center') % normalize so rows 1 and 3 have mean 0
[mean(M(1, :)), mean(M(3, :))] % check -- should be close to 0
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matrices and Arrays 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!