[Scilab-users] Shift indices

Richard llom richard.llom at gmail.com
Wed Nov 8 15:07:31 CET 2017


Hello,
is there a function available to shift indices?
E.g. I have
aa = [1:10]
and want
bb =  6.   7.   8.   9.   10.   1.   2.   3.   4.   5.

This is what I come up with:
log_data2 = zeros(log_data);
log_data2 = log_data(4001:size(log_data,1),:);
log_data2((size(log_data,1)-4000+1):size(log_data,1),:) =
log_data(1:4000,:);

But I'm wondering if there is a prettier solution?

Thanks
richard



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html



More information about the users mailing list