root/applications/dual/SIDP/bakalarka/SIDPS/matlab/motor2/index.asv @ 1351

Revision 1351, 150 bytes (checked in by zimamiro, 13 years ago)
Line 
1function index=index(k,n_grid,dim)
2index=zeros(1,dim);
3for i=dim:-1:1
4    index(i)=floor(k/n_grid^i);
5    k=k-index(i)*n_grid^i;
6end
7index=
8end
Note: See TracBrowser for help on using the browser.