How to normalize a matrix?

2 ビュー (過去 30 日間)
chan
chan 2021 年 9 月 28 日
回答済み: Steven Lord 2021 年 9 月 28 日
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 日
Use the normalize function.

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by