Determining and communicating active basis functions

Once ``setup.m'' determines G2mx, have it determine the list of active basis functions and corresponding values of G2, and print out some debugging information with the statements
%# Compute active list and corresponding G2's
active=find(G2<...); %# Sphere is 1/2 size (but looking at G^2!)
G2c=G2(active);

printf("Compression: %f (theoretical: %f)\n", ...
		     size(M,1)/length(G2c), 1/(4*pi*(1/4)^3/3));
where ``...'' is an appropriate formula in terms of G2mx. Finally, to communicate the pertinent information to the rest of the software, declare gbl_active and gbl_G2c as global variables at the top of ``setup.m'' and be sure to set gbl_active and gbl_G2c to the values you find above.
Note: for the test case S=[4;6;8], there will be only one active element, active=[1].



Tomas Arias 2005-05-04