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 ?
3 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Steven Lord
2021-5-20
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hypothesis Tests 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!