How to normalize a matrix?

i Have a matrix of X = rand([n,key_size,6]); where n=6,key_size=3
How to normalize X in such a way that every row sum of X(:,:,i) should be 1 except for i th row. i can be any numbers from 1 to 6.
If i=4 then how to normalize X such that row sum is 1 except for row 4?

답변 (1개)

Steven Lord
Steven Lord 2021년 9월 28일

1 개 추천

Use the normalize function.

카테고리

도움말 센터File Exchange에서 Dynamic System Models에 대해 자세히 알아보기

태그

질문:

2021년 9월 28일

답변:

2021년 9월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by