How to distribute elements of a vector to each of output variable?

4 次查看(过去 30 天)
x = [1,2,3,4,5]
x = 1×5
1 2 3 4 5
[a,b,c,d,e] = deal(x(1:5))
a = 1×5
1 2 3 4 5
b = 1×5
1 2 3 4 5
c = 1×5
1 2 3 4 5
d = 1×5
1 2 3 4 5
e = 1×5
1 2 3 4 5
How do I write code such that a=1, b=2, c=3, d=4, e=5?

回答(1 个)

Stephen23
Stephen23 2021-12-7
编辑:Stephen23 2021-12-7

类别

Help CenterFile Exchange 中查找有关 FPGA, ASIC, and SoC Development 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by