Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想采用简单的示例代码并rand()为每个变量分配一个唯一值——在一行上:
rand()
X = rand(); Y = rand();
可能的?
如果您绝对希望它在一行中,您可以执行以下操作:
[X, Y] = deal(rand(), rand());
不过收获不大。
一条线...
……这就是你所需要的吗?