There is a cell array, saying A = {a_1 x b, a_2 x b, a_3 x b, …, a_n x b}.
After doing B = cell2mat(A), I can get a matrix B, which is (a_1+a_2+…+a_n) x b.
After processing the matrix B, I get my wanted elements in B, saying they are x, which is the row index of Matrix B.
How can I get the corresponding element in original cell A?
For example, if x = 1, it must come from the first element in A. If x > a_1 && x < a_2, it must come from the second element in A.
Is there any function in matlab?
Thanks,
Zhong
Best Answer