may i ask how to separate a value into two different values? For example, 12 can be separate into 8 and 4..

2 次查看(过去 30 天)
may i ask how to separate a value into two different values? For example, 12 can be separate into 8 and 4..

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2016-4-22
编辑:Azzi Abdelmalek 2016-4-22
If you mean how to do it randomly with integer numbers:
N=12
a=randi(N)
b=N-a

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by