I need to reshape each row vector in 'x' to the 2D matrix as indexed in 'idx'. I have written the code and working fine. But it takes more time as the number of rows in x is high. Is there any way to reduce the execution time?
idx = buffer(1:28000,10,5,'nodelay');
Elapsed time is 1.450427 seconds.