Ask Your Question

Revision history [back]

cell arrays octave

Sorry my question probably naive. I have vector K with numbers. K = 92 93 109 110 114 115 143 147 161 162 I have also a cell-array C = { [1,1] = 4 [2,1] = 2 [3,1] = 5 [4,1] = 9 [5,1] = 7 [6,1] = 6 [7,1] = 8 [8,1] = 1 [9,1] = 3 [10,1] = 10 }

I need to compose the vector with values from K in C order.

I can do it using K([4,2,5,9,7,6,8,1,3,10]), but how to write it using a variable. Thank you very much.