Info
此问题已关闭。 请重新打开它进行编辑或回答。
could anyone tell me how to fix the sum of (n,m) array to a fixed value .
1 次查看(过去 30 天)
显示 更早的评论
could anyone tell me how to fix the sum of (n,m) array to a fixed value .
回答(1 个)
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 个评论
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!