フィルターのクリア

How can I adjust data to make it a percentage of 1000

1 回表示 (過去 30 日間)
Glowworm8
Glowworm8 2018 年 6 月 19 日
編集済み: Glowworm8 2018 年 6 月 19 日
I have a fixed 3x14 matrix and need to divide each row by the total sum of the matrix then multiply it by 1000 so it appears normalised to 1000 on the Y axis of a bar chart it feeds into, but am unsure how to do it

採用された回答

KSSV
KSSV 2018 年 6 月 19 日
A = rand(3,14) ;
thesum = sum(A(:)) ;
iwant = A/thesum*1000 ;
  1 件のコメント
Glowworm8
Glowworm8 2018 年 6 月 19 日
thank you! will rand not give me random values? I already have the values in a matrix called mix2, can I replace rand with mix2?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by