Info

この質問は閉じられています。 編集または回答するには再度開いてください。

could anyone tell me how to fix the sum of (n,m) array to a fixed value .

1 回表示 (過去 30 日間)
Prabha Kumaresan
Prabha Kumaresan 2018 年 1 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
could anyone tell me how to fix the sum of (n,m) array to a fixed value .
  1 件のコメント
Stephen23
Stephen23 2018 年 1 月 25 日
編集済み: Stephen23 2018 年 1 月 25 日

回答 (1 件)

bon sai
bon sai 2018 年 1 月 25 日
if [n,m] = size(A), then you can sum by column and then sum by row, or vice visa.
sum(sum(A,1),2)
you will get the same value.
  4 件のコメント
Prabha Kumaresan
Prabha Kumaresan 2018 年 1 月 25 日
Ok.But in randfixedsum, the sum(n+m) of (nxm) array should be equal to s.But for me the sum of array will not be equal to s.In such case how it can be done.
Walter Roberson
Walter Roberson 2018 年 1 月 25 日
"in randfixedsum, the sum(n+m) of (nxm) array should be equal to s"
I do not understand what you are trying to say there? What I think it says is something that is not correct.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by