1
可能重複:
MATLAB Easiest way to assign elements of a vector to individual variables.
How do I do multiple assignment in MATLAB?如何提取matlab中的矩陣元素?
如果我有一個矩陣:A = [1, 5, 10]
,做我設置a1 = A(1), b1 = B(1)
等在同一行?我想要做的事,如:
[a1 a2 a3] = Blah(A)
此問題已被多次詢問:http://stackoverflow.com/questions/2337126/how-do-i-do-multiple-assignment-in -matlab,http://stackoverflow.com/questions/2893356/matlab-easiest-way-to-assign-ele ments-of-a-vector-to-individual-variables,http://stackoverflow.com/questions/2740704/is-there-anything-like-deal-for-normal-matlab-array – Amro 2010-09-18 21:48:52