Add first element to a cell array
Dear,
I would like to add a new element in the first position in an cell array
For example if ArrCell={[1],[2],[3],[4],[5]} is the existing cell and [new] is a matrix. I would like to get
ArrCell={[new],[1],[2],[3],[4],[5]}
Of course, I can get this result using a temporal cell array and looping over all the elements of the existing one, but the quesion is if there an efficient way to get this result
Thanks in advance,Dear,
I would like to add a new element in the first position in an cell array
For example if ArrCell={[1],[2],[3],[4],[5]} is the existing cell and [new] is a matrix. I would like to get
ArrCell={[new],[1],[2],[3],[4],[5]}
Of course, I can get this result using a temporal cell array and looping over all the elements of the existing one, but the quesion is if there an efficient way to get this result
Thanks in advance, Dear,
I would like to add a new element in the first position in an cell array
For example if ArrCell={[1],[2],[3],[4],[5]} is the existing cell and [new] is a matrix. I would like to get
ArrCell={[new],[1],[2],[3],[4],[5]}
Of course, I can get this result using a temporal cell array and looping over all the elements of the existing one, but the quesion is if there an efficient way to get this result
Thanks in advance, cell array MATLAB Answers — New Questions